参数绑定HTML

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
  6. <script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
  7. </head>
  8. <body>
  9. <div id="app">
  10. <pre><a v-bind:href="url">青青子衿</a></pre>
  11. </div>
  12.  
  13. <script>
  14. new Vue({
  15. el: '#app',
  16. data: {
  17. url: 'http://www.boonya.com'
  18. }
  19. })
  20. </script>
  21. </body>
  22. </html>

参数绑定效果:

事件绑定HTML

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
  6. <script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
  7. </head>
  8. <body>
  9. <div id="app">
  10. <a v-on:click="doSomething">doSomething</a>
  11. </div>
  12.  
  13. <script>
  14. new Vue({
  15. el: '#app',
  16. data: {
  17. doSomething:function(){
  18. alert("Do something");
  19. }
  20. }
  21. })
  22. </script>
  23. </body>
  24. </html>

事件绑定效果:

VueJS参数绑定:v-bind:href,v-on:event的更多相关文章

  1. lambda及参数绑定

    一.介绍   对于STL中的算法,我们都可以传递任何类别的可调用对象.对于一个对象或一个表达式,如果可以对其使用调用运算符,则称它为可调用的.即,如果e是一个可调用的表达式,则我们可以编写代码e(ar ...

  2. 启动服务报错:nested exception is java.lang.NoSuchMethodError: org.apache.cxf.common.jaxb.JAXBUtils.closeUnmarshaller(Ljavax/xml/bind/Unmarshaller;)V

    1.启动tomcat时报错:Error creating bean with name 'payInfService': Invocation of init method failed; neste ...

  3. 10.3.4参数绑定 bind

    Count_if算法,类似find_if,此函数接受一对迭代器,表示一个输入范围,还接受一个谓词,会对输入范围中的每个元素执行.Count_if返回一个计数值,表示谓词有多少次为真.    使用bin ...

  4. 泛型2(lambda表达式/参数绑定)

    lambda 表达式: Lambda表达式完整的声明格式如下: [capture list] (params list) mutable exception-> return type { fu ...

  5. SpringMVC参数绑定学习总结【前后端数据参数传递】

    目录 1. 绑定机制 2. 支持的数据类型 3. 参数请求中文乱码解决 4.自定义类型转换器 5.最后参数绑定学习小结 SpringMVC作为Controller层(等价servlet和struts中 ...

  6. SSM框架之SpringMVC(2)参数绑定及自定义类型转换

    SpringMVC(2)参数绑定及自定义类型转换 1.请求参数的绑定 1.1. 请求参数的绑定说明 1.1.1.绑定机制 表单提交的数据都是k=v格式的 username=haha&passw ...

  7. Spring MVC初始化参数绑定

    初始化参数绑定与类型转换很类似,初始化绑定时,主要是参数类型 ---单日期 在处理器类中配置绑定方法  使用@InitBinder注解 在这里首先注册一个用户编辑器 参数一为目标类型   proper ...

  8. SpringMvc中初始化参数绑定

    初始化参数绑定与类型转换很类似,初始化绑定时,主要是参数类型 ---单日期 在处理器类中配置绑定方法  使用@InitBinder注解 在这里首先注册一个用户编辑器 参数一为目标类型   proper ...

  9. MVC中Action参数绑定的过程

    一.题外话 上一篇:MVC中Action的执行过程 ControllerContext 封装有了与指定的 RouteBase 和 ControllerBase 实例匹配的 HTTP 请求的信息. 二. ...

随机推荐

  1. [python][oldboy][dict] 遍历字典

    # coding=utf8 dict_info = {"abc": 1, 1: "liuzhipeng"} for k, v in dict_info.item ...

  2. 近期JS心得

    child和tags都是[{id:1,value:'a'}]的格式,当点击一级标签,要看二级标签是否已经被选中,如果被选中,则清除出去 如果用for循环 再splice的话 当删除掉了一个元素后,数组 ...

  3. cf- 297 < a >--字符串操作技巧

    A. Vitaliy and Pie time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  4. springboot中的controller注解没有生效

    springboot中的controller注解没有生效  , 启动的Application类没有在controller的父目录或同级目录

  5. canvas 转化为 img

    ]; var image = new Image(); image.src = c.toDataURL("image/png"); $("#qrcode canvas&q ...

  6. FOJ Problem 2254 英语考试

                                                                                                        ...

  7. app_data中的数据库使用

    原文发布时间为:2008-07-24 -- 来源于本人的百度文章 [由搬家工具导入] ASP.NET中利用VWD操作数据库 建立本地数据库   你可以轻易地在Visual Studio的Web应用程序 ...

  8. 【Visual Studio】error LNK2038: 检测到“_MSC_VER”的不匹配项: 值“1600”不匹配值“1800” (转)

    1.案例一 _MSC_VER 定义编译器的版本.下面是一些编译器版本的_MSC_VER值:MS VC++ 10.0 _MSC_VER = 1600MS VC++ 9.0 _MSC_VER = 1500 ...

  9. os.system() 和 os.popen()

    1.os.popen(command[, mode[, bufsize]])  os.system(command) 2.os.popen() 功能强于os.system() , os.popen() ...

  10. Codeforces 889C Maximum Element(DP + 计数)

    题目链接  Maximum Element 题意  现在有这一段求序列中最大值的程度片段: (假定序列是一个1-n的排列) int fast_max(int n, int a[]) { int ans ...