javascript - jQuery syntax problem -



javascript - jQuery syntax problem -

this simple function , have

<p>this paragraph 1.</p>

like function not working? wrong here?

function select(){ $('p')[0].innerhtml="helooo!!"; }

html:

<p>this paragraph 1.</p> <p>this paragraph 2.</p> <p>this paragraph 3.</p> <p>this paragraph 4.</p> <p>this paragraph 5.</p> <p>this paragraph 6.</p>

jquery:

$('p:eq(0)').html("helooo!!");

i suggest this, because easy alter apply more elements, if necessary later.

javascript jquery

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -