faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 14 people (86%) answered Yes
Recently 5 of 6 people (83%) answered Yes

Entry

How can I remove the mark up from an HTML element's content?

Mar 7th, 2000 06:59
Martin Honnen,


That is simple with IE4+. You simply set
  elementRef.innerHTML = elementRef.innerText;
as in

<SPAN ONCLICK="this.innerHTML = this.innerText">
<B>
Kibology
</B>
for
<FONT SIZE="+2">
all
</FONT>
</SPAN>