All modern browsers support getElementById() method. However if you are to support very old browsers, use the following function:
function getElement (id)
{
if (document.getElementById)
{
return document.getElementById(id);
}
else if (document.all)
{
return window.document.all[id];
}
else if (document.layers)
{
return window.document.layers[id];
}
}



0 comments:

Post a Comment

 
Top
Blogger Template