InnerHtml is not working in FireFox and Safari.
16 June 2009
2 Comments
Few days back while working with “InnerHtml”, I realized that the tag doesn’t work properly for Firefox and Safari.So I tried searching for the solution, by checking the tag against each browser using JavaScript.
I replaced “InnerHtml” with “textContent” (Firefox and Safari) and “innerText†(IE5+) and it worked!
if (document.layers) {
type="NN";
} else {
if (document.all) {
if (document.getElementById) {
//type="IE5+";
var spanTags = document.getElementsByTagName('span');
for (var i = 0; i
Translate this post











































Leave your response!