Thursday, January 6, 2011

innerText and textContent

In firefox, no innerText property, you have to go by textContent.
One line code to check this:
var hasInnerText = (document.getElementsByTagName("body")[0].innerText != undefined) ? true : false;

No comments:

Post a Comment