Alternate to InnerText in Javascript
We all have used control.innertext property in javascript, but we all know the problem of browsers. Today I came to know that “innertext” property is not working in firefox/safari. what now ? Use “textContent” in lieu of “innertext” property. However “innerHtml” property is working fine with all browsers. COOL
E.g. :
var completeText = document.getElementById(‘divText’).textContent; // same as innertext.
About this entry
You’re currently reading “Alternate to InnerText in Javascript,” an entry on Welcome to ViSh’s Blogs
- Published:
- January 10, 2008 / 6:59 am
- Category:
- Javascript
- Tags:
Hi ITians ! This is Vish here. Lemme brief myself. I have completed my MCA (Master of Computer Application) in 2005 and now having around 3.5+ years of experience in .NET Technologies. Presently I am working as a Sr. Teal Lead with a growing software company in Ahmedabad.
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]