汇智学堂-Vue.js入门之二(双向数据绑定)
程序员文章站
2022-06-06 23:15:29
...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="app">
<h1>{{message}}</h1>
<input type="text" v-model="message" />
</div>
</body>
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js'></script>
<script>
var vm=new Vue({
el:'#app',
data:{
message:'hello world,I am Vue.js'
}
});
</script>
</html>