/ Published in: JavaScript
cross-browser document.getElementById, should be on top of code.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// cross-browser document.getElementById, should be on top of code. if(!document.getElementById) { if(document.all) document.getElementById=function() { if(typeof document.all[arguments[0]]!="undefined") return document.all[arguments[0]] else return null } else if(document.layers) document.getElementById=function() { if(typeof document[arguments[0]]!="undefined") return document[arguments[0]] else return null } }