<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>演示响应式声明渲染</title>
</head>
<body>
    <div id="app">
        <p>{{message}}</p>
        <input type="text" v-model="message">
<!--        <button onclick="alert('message=' + vm.message)">点击看看</button>-->
        <button v-on:click="alert1">完整绑定方式</button>
        <button @click="alert1">缩写绑定方式</button>
    </div>

    <script src="../js/vue.js"></script>

    <script>
        let myData = {
            message:'Hello Vue'
        };

        let vm = new Vue({
            el:'#app',
            data:myData,
            methods:{
                alert1:function () {
                    alert('message=' + this.message);
                }
            }
        });
    </script>
</body>
</html>