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 -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -