<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <h2>val的值为 {{val}}</h2>
    <input type="text" v-model="val">

    <h2>性别: {{sex}}</h2>
    <input type="radio" v-model="sex" value="男">男
    <input type="radio" v-model="sex" value="女">女


    <h2>爱好: {{hobby}}</h2>
    <input type="checkbox" value="篮球" v-model="hobby">篮球
    <input type="checkbox" value="羽毛球" v-model="hobby">羽毛球
    <input type="checkbox" value="排球" v-model="hobby">排球

    <br>
    <select name="" id="" v-model="school">
      <option value="小学">小学</option>
      <option value="初中">初中</option>
      <option value="高中">高中</option>
    </select>
  </div>
  <script src="vue.js"></script>
  <script>
    /* 
      双向数据绑定
      数据变化-> 页面变化
      页面变化-> 数据变化
    */
    var app = new Vue({
      el: '#app',
      data: {
        val: '2',
        sex: '男',
        hobby:['篮球'],
        school: '小学'
      },
      methods:{

      }
    })
  </script>
</body>
</html>