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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -