Objects in this mirror are closer to Microsoft Technologies. DNM objective is to help users on Microsoft technologies by providing Articles, snippets, Interview Questions.

02 September 2012

Change the text of a span control in javascript


In this tip we will see how to change the text of span control using Javascript. In HTML/ASPX page, span control will be defined as 
<span id="spanElement"> span text </span> 

In order to change the value of span element in java script use below code. 
document.getElementById('spanElement').innerHTML = "span text from JS";


0 Comments:

Post a Comment