<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>

</style>
</head>
<body>
<div id="app" v-cloak>
<h2 >{{a}}</h2>
<button @click="add">点击加1</button>
</div>
<script src = "js/vue.js"></script>
<script>
var vue = new Vue({
el: "#app",
data: {
a: 100
},
methods:{
add(event) {
console.log(event)
}
}
})
</script>
</body>
</html>

vue指令:v-on(@click)绑定点击事件,也就是方法_javascript