Re: accessing html collections
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: accessing html collections

From: Randy Webb <HikksNotAtHome@aol.com>
Date: Wed Dec 07 2005 - 14:56:16 CET

mumrah@gmail.com said the following on 12/7/2005 8:35 AM:
> When getting different elements out of an array in JS, i know
> array.item(0) and array[0] both return the 0th element. My question,
> will this work in any instance?

Only in IE. [] is for Arrays. () is for function calls. IE makes () for
whatever it wants to use them for. Use [].

-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Received on Sun Dec 11 14:32:59 2005