getElementById Cross Browser
Login or Register to Bookmark this snippet
xGetElementById is a cross-browser version of document.getElementById
function xGetElementById(e) {
if(typeof(e)!='string') return e;
if(document.getElementById) e=document.getElementById(e);
else if(document.all) e=document.all[e];
else e=null;
return e;
}
Added by JC on 11th November, 2007
There are no comments about this snippet.
You must be registered and logged in to post a comment.
Login here to post a comment