首页 > 其他分享 >vue.js代码018

vue.js代码018

时间:2023-02-25 12:02:22浏览次数:42  
标签:obj2 obj Title value js vue let 018 set


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<script type="text/javascript">
//数据代理,通过一个对象,对另外一个对象的属性进行修改
let obj = {x:100};
let obj2 = {y:200};

Object.defineProperty(obj2,'x',{
get:function () {
return obj.x;
},
set(value){
obj.x = value;
}
});

</script>
</body>
</html>

标签:obj2,obj,Title,value,js,vue,let,018,set
From: https://blog.51cto.com/u_15356972/6085199

相关文章

  • vue.js代码020
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码015
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码013
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码017
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码012
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码014
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码016
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • vue.js代码011
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scripttype="text/javascript"src="../js/vue.js"></script></head><......
  • Vue-cli创建的项目结构分析,各初始化文件解释说明
    结构图: 一、项目结构说明 1、.gitignore:git的忽略文件(哪些文件或文件夹不想接受git管理的,可在此文件配置) 2、babel.config.js:babel控制文件,ES6=》ES5 3、packag......
  • java提供link;string转json
    java提供linkJSONObjectjsonObject=newJSONObject();jsonObject.put("type",1);resp.setLink(newLink(5,surveyId,"COLLE......