I am using this function when i write javascript code. In steads of writing document.getElementById ever time i use this function $.
document.getElementById('id').value;
$('id').value;
function $(id){
return document.getElementById(id);
}
return document.getElementById(id);
}
Instead using document.getElementById you can use $.
document.getElementById('id').value;
$('id').value;