第一个Vus.js

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4 <meta charset="utf-8">
 5 <title>第一个Vue.js</title>
 6   <!--<script src="vue.js"></script>-->
 7   <script src="https://unpkg.com/vue"></script>
 8 </head>
 9 <body>
10 
11   <div id="vue-app">
12     <h1>{{ name }}</h1>
13     <p><h1>{{ greet("花花世界") }}</h1></p>
14     <h1><a v-bind:href="urla">ViewModel    DOM Listeners    Data Bindings</a></h1>
15     <p><input type="text" v-bind:value="name"/></p>
16     <p v-html="websiteTag"></p>
17     <a href="https://unpkg.com/vue">aa</a>
18   </div>
19 
20   <script>
21 
22     new Vue({
23       el:"#vue-app",
24       data:{
25         name:"米开朗琪罗",    
26         age:1800,
27         urla:"http://www.baidu.com",
28         websiteTag:"<a href='http://www.baidu.com'>百度</a>",
29       },
30       methods:{
31         greet:function(time){
32           return "Good"+time+";"+this.name+",age:"+this.age;
33         }
34       }
35     });
36 
37   </script>
38 
39 <!--${ pageContext.request.contextPath}-->
40 

42 </body>
43 </html>

 

转载于:https://www.cnblogs.com/sunduge/p/7902884.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值