案例:Vue.js案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>Vue 测试实例 - W3xue教程(w3xue.com)</title>
6
<script src="//unpkg.com/vue/dist/vue.js"></script>
7
</head>
8
<body>
9
<div id="app">
10
  <button v-on:click="counter += 1">增加 1</button>
11
  <p>这个按钮被点击了 {{ counter }} 次。</p>
12
</div>
13
14
<script>
15
new Vue({
16
  el: '#app',
17
  data: {
18
    counter: 0
19
  }
20
})
21
</script>
22
</body>
23
</html>