Changing label content using Javascript -


is possible change label content using javascript?

<label>how it?</label> <input type="button" value="change label"/> 

give label id , change this:

<label id='label-id'>how it?</label> <input type="button" value="change label"        onclick="document.getelementbyid('label-id').innerhtml = 'like this!';"/> 

(forgive inline event handler. :-) )

working demo here: http://jsfiddle.net/bd349/


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -