zoukankan      html  css  js  c++  java
  • 第一个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>
  • 相关阅读:
    双显示器或更多个显示器,能分别设置不同的壁纸吗?
    二叉排序树
    如何将一棵树转化为对应的二叉树
    【例2.1】使用成员函数的实例
    [例1.10]使用setw设置输出宽度的例子
    python学习(三)-面向对象
    git 笔记
    python学习笔记(二)
    python基础语法
    fiddler
  • 原文地址:https://www.cnblogs.com/sunduge/p/7902884.html
Copyright © 2011-2022 走看看