对象
var obj = new Object();
var obj1 = {
name:"李四",
age:20
};
obj.name = "张三":
obj.age = 18;
obj.name = "新值";
document.write(obj.name);
document.write(name in obj)
for (var a in obj ){
document.write(a);
}
delete obj.name;
函数
var fun2 = new Function("document.write('函数调用2'+'<br />');");
var fun = function(){document.write("函数调用1<br />");};
function fun1(a,b){document.write(a+b+"<br />");};
fun2();
fun();
fun1("函数调用",3);
function fun4(){
document.write("函数调用4");
return
}
xing = fun4();
(function(a){
function fun5(a){
for(var b in a){
document.write(a[b]+"<br />");
}
}
return fun5(a);
})(obj1);