v-model结合select

<body>
    <div id="app">
        <select name="" id="" v-model="selected">
            <option value="shanghai">上海</option>
            <option value="beijing">北京</option>
            <option value="nanjing">南京</option>
            <option value="shenzhen">深圳</option>
        </select>

        您已选择:{{selected}}
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                selected: ''

            }
        })
    </script>
</body>

 

v-model结合select

 

上一篇:造https client*的记录


下一篇:sql集合查询