Gags' Blog
Pages
Home
Tutorials
Dice Games
Code Snippets
Circuits
April 4, 2013
Code Snippet: getById
In a simple JavaScript project that does not use JQuery or other third-party libraries, I find this to be a nice shortcut for
document.getElementById()
:
function getById(id) { return document.getElementById(id); }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment