<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="./lib/vue.min.js"></script>
</head>
<body>
<div id="app">
{{message}}
<input type="button" vale="点击" v-on:click=clickMe() >
<input type="button" vale="提交" v-on:click=clickMe('aa') >
<input type="button" vale="提交" @click=clickMe('aa') >
</div>
</body>
</html>
<script>
var vm= new Vue({
el:"#app",
data:{
message:"我是好人"
},
methods:{
clickMe:function(name){
// alert(name)
this.message="我是坏人"
}
}
})
</script>