Re: shorten a method string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: shorten a method string

From: Evertjan. <exjxw.hannivoort@interxnl.net>
Date: Tue Jan 31 2006 - 13:11:24 CET

neoswf wrote on 31 jan 2006 in comp.lang.javascript:

> hi. i want to shorten getElementById() string at my files.
> ive writen this function:
> function gebi(el){
> document.getElementById(el)
>}
> and when i try to call an ID, i try to call him like this:
> gebi('myID').
> but this method doesnt succeed.
> can you please assist me to achive that goal?
>

function gebi(el){
     return document.getElementById(el);
}

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Received on Tue Feb 7 21:28:36 2006