摘要:
第一种 var arr = new Array(); arr[0] = 123 arr[1] = "abc"; arr[5] = false;alert(arr[3]);//undefined alert(arr);//123,abc,,,,false alert(arr[1... 阅读全文
摘要:
1、var s = "this is a string"; var t = "this is also a string"; s.test = 20;2、var s = new String("this is a string"); var t = new String("this is al... 阅读全文
摘要:
with 确定某个对象的作用区域,在with代码段内的次对象的属性或方法可以直接使用。例://比如stu中有name,age属性和walk方法with(stu){ alert(name+" "+age);//即省略了stu.name此种类型的调用 walk(); }in 用于便利对... 阅读全文