<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on 指令函数的两种定义方式</title>
    <script src="//static.gzj2001.com/vue/vue.js"></script>
</head>
<body>
    <div id="app">
        <button v-on:click="scors+=1">增加1</button>
        <div>{{scors}}</div>

        <button v-on:click="say('123')">say</button>
        <button v-on:click="test('123')">test</button>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                scors:0
            },
            methods:{
                say:function(cs){
                    alert(cs);
                }
            }
        })

        function test(cs){
            alert(cs);
        }
    </script>
</body>
</html>