Some cross browser javascript examples

//firefox only
slot = childNodes[j].textContent;
//Cross browser
slot = childNodes[j].firstChild.nodeValue;

//ie and firefox
attrvalue.value = products[i].sku;
attrname.value = products[i].sku;

//ie, firefox and safari
attrvalue.nodeValue = products[i].sku;
attrname.nodeValue = products[i].sku;

Comments

Popular posts from this blog

Vim vi how to reload a file your editing