I'm amazed at how many people don't use a very simple shortcut for document.getElementById. This is for all the people who don't use a javascript library like jQuery. All you have to do is include this code somewhere on your page Code: function $(element) { return document.getElementById(element); } Then when you want to use document.getElementById('id'); just type $('id'); instead. Example Code: <html> ...
function $(element) { return document.getElementById(element); }
document.getElementById('id');
<html>