zoukankan      html  css  js  c++  java
  • vue学习笔记三:常见的表单绑定

    <template>
        <div id="app">
            <input type="checkbox" id="checked" v-model="checked"/>
            <label for="checked">{{checked}}</label><br />
            <input type="checkbox" id="jack" value="jack" v-model="names" />
            <label for="jack">jack</label>
            <input type="checkbox" id="sim" value="sim" v-model="names" />
            <label for="sim">sim</label>
            <input type="checkbox" id="tom" value="tom" v-model="names" />
            <label for="tom">tom</label>
            <input type="checkbox" id="mei" value="mei" v-model="names" />
            <label for="mei">mei</label>
            <p>{{names}}</p>
            <input type="radio" id="male" value="male" v-model="gender" />
            <label for="male">male</label>
            <input type="radio" id="female" value="female" v-model="gender" />
            <label for="female">female</label>
            <p>{{gender}}</p>
            <select name="choose" id="choose" v-model="choose">
                <option value="" disabled="">please select</option>
                <option value="grade one">grade one</option>
                <option value="grade two">grade two</option>
                <option value="grade third">grade third</option>
            </select>
            <p><label for="choose">{{choose}}</label></p>
        </div>
    </template>
    
    <script>
        export default {
            name: 'app',
            data() {
                return {
                    checked : false,
                    names : [],
                    gender : "",
                    choose : "",
                }
            }
        }
        
    </script>
  • 相关阅读:
    C++相关资料
    OpenCV相关资料参考
    QT-undefined reference to vtable
    QToolButton弹出菜单
    QT-信号和槽机制
    了解字符集和编码
    apache配置Directory目录权限的一些配置
    linux用户(组)及文件权限说明
    Linux下重要日志文件及查看方式
    四种常见的 POST 提交数据方式
  • 原文地址:https://www.cnblogs.com/diantao/p/7325956.html
Copyright © 2011-2022 走看看