码迷,mamicode.com
首页 > Web开发 > 详细

js中赋值表达式的值为右边

时间:2015-09-22 20:22:32      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

var name="the window";
var o={
name:"the object",
getName:function(){
console.log(this.name);
}
};
o.setName=function(){
console.log(this.name);
var n=function(){
console.log(this.name+"123123");
};
(o.getName=n)();//the window123123
};
o.getName();//the object123123
(o.setName)();//the object

 

js中赋值表达式的值为右边

标签:

原文地址:http://www.cnblogs.com/yhf286/p/4830096.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!