I have a span tag inside, there is some html code to create some angles and other things. Now, using javascript, I want to add some captions to it. A constraint is the original contents of a range that should not be overwritten.
For instance,
<span> <!-some more complicated html code </span>
Now I want to add a title to the span so that the span looks like
<span> NEW CAPTION <!-some more complicated html code </span>
How can i do this?
document.getElementById.innerHtml = "NEWCAPTION" + document.getElementById.innerHtml
Is it correct?
source share