Web 2.0 Training
 

Random Header :: Unpredictably Exciting

category archive listing Category Archives: JavaScript

A simple shortcut in Javascript !

document.getElementById(’id_of_element’).value
How many of you tried to use this JavaScript’s case sensitive way to access an element ? Have you ever wished for a smaller code to access the element ? If yes… I am here to grant your wish with this simple function.
Just add the following line on the top of your JavaScript code:
function $(o){return […]