Skip to content

Instantly share code, notes, and snippets.

@mzabriskie
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzabriskie/8960578 to your computer and use it in GitHub Desktop.
Save mzabriskie/8960578 to your computer and use it in GitHub Desktop.
Legacy get element code circa 2001
function getElement(id) {
var el = null;
if (document.getElementById) {
el = document.getElementById(id);
}
else if (document.all) {
el = document.all[id];
}
else if (document.layers) {
el = document.layers[id];
}
return el;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment