当前位置: 代码迷 >> Web前端 >> 创建对象一种步骤
  详细解决方案

创建对象一种步骤

热度:123   发布时间:2013-11-08 17:51:56.0
创建对象一种方法
var obj = {
	"s1" : "String --> s1",
	"f1" : function (){
		alert("f1()");
	},
	"f2" : function (){
		alert("f2()");
		return true;
	}
}

obj.f1();
if(obj.f2()){
	alert("f2() return true .");
}
alert(obj.s1);

?

?创建对象的一种方法。

  相关解决方案