abstract:<html> <head> <meta charset="utf-8"> <title&
<html> <head> <meta charset="utf-8"> <title>侦听器</title> <script type="text/javascript" src="vue.js"></script> </head> <body> <div id="box"> 请输入数字1 <input type="text" v-model="num1"> 请输入数字2 <input type="text" v-model="num2"> <h2>两数相加结果为:{{sum}}</h2> </div> <script type="text/javascript"> new Vue({ el:"#box", data:{ num1:"", num2:"" }, computed:{ sum:function(){ return parseInt(this.num1)+parseInt(this.num2); } } }) </script> </body> </html>
Correcting teacher:查无此人Correction time:2019-05-05 09:19:47
Teacher's summary:看到你的作业挺多,学习编程需要有耐心,坚持。继续加油