本文实例为大家分享了vue.js表单控件绑定的具体代码,供大家参考,具体内容如下
html:
<Meta charset="UTF-8">
表单控件绑定
{{message}}
<div id="app-2">
<input type="checkBox" id="checkBox" v-model="checked">
<label for="checkBox">{{ checked }}
Box" id="checkBoxjack" v-model="checkedNames" value="Jack">
Box" id="checkBoxJohn" v-model="checkedNames" value="John">
Box" id="checkBoxMike" v-model="checkedNames" value="Mike">
我是{{checkedNames}}
<div id="app-4">
<input type="radio" id="man" value="man" v-model="sex">
<label for="man">man
<input type="radio" id="woman" value="woman" v-model="sex">
<label for="woman">woman
选择的时是{{sex}}