在firefox上犯的一个数组定义异常,不支持location作为数组名
在firefox下犯的一个数组定义错误,不支持location作为数组名
源代码如下:
<head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> </head> <script type="text/javascript"> var location = new Array(["AF"],["AL"]); alert(location.length); </script> <body> </body> </html>
在firefox打不开,但在ie下正常,以为是firefox是不能这样定义数组,瞪眼半天也没有发现错误,后来随便改了一个数组名就可以.