Common JavaScript Functions

/ Published in: JavaScript
Save to your folder(s)

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

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.