js中直接声明一个对象的方法

时间:2014-08-10    点击:104   
var ctrl = { 
init: function(){ 
this.a(); 
this.b(); 
}, 
name : "zs", 
a: function(){ 
alert("aa"); 
}, 
b: function(){ 
alert("bb"); 
} 
}; 
var str = ctrl.name; 
console.info(str); //zs 
ctrl.init(); //弹出aa,bb
教你在heroku云平台上部署Node.js应用
浅析Node在构建超媒体API中的作用
javascript实现的平方米、亩、公顷单位换算小程序
jquery访问ashx文件示例代码
JavaScript动态改变HTML页面元素例如添加或删除
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved