We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

neal_grosskopf on 04/29/08


Tagged

javascript functions


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

neal_grosskopf
mtelligent


Common JavaScript Functions


Published in: JavaScript 


URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=11

Slim down the size of your javascript by using these custom functions.


  1. function gd(e) { return document.getElementById(e); }
  2. function gs(e) { return document.getElementById(e).style; }
  3. function gv(e) { return document.getElementById(e).value; }
  4. function dw(i) { return document.write(i); }

Report this snippet 

You need to login to post a comment.