码迷,mamicode.com
首页 > 其他好文 > 详细

内联处理器里的方法

时间:2017-09-17 15:20:35      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:button   body   vue   div   lang   pre   text   oct   bsp   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button v-on:click="fun(‘value11111‘)">aaa</button>
        <button v-on:click="fun(‘value22222‘)">bbb</button>
    </div>
</body>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript">
    new Vue({
        el:"#app",
        methods:{
            fun:function(a){
                alert(a)
            }
        }
    })
</script>

</html>

 

内联处理器里的方法

标签:button   body   vue   div   lang   pre   text   oct   bsp   

原文地址:http://www.cnblogs.com/jinsuo/p/7535247.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!