vue学习笔记三:常见的表单绑定

vue

<template>

<div >

<input type="checkbox" />

<label for="checked">{{checked}}</label><br />

<input type="checkbox" />

<label for="jack">jack</label>

<input type="checkbox" />

<label for="sim">sim</label>

<input type="checkbox" />

<label for="tom">tom</label>

<input type="checkbox" />

<label for="mei">mei</label>

<p>{{names}}</p>

<input type="radio" />

<label for="male">male</label>

<input type="radio" />

<label for="female">female</label>

<p>{{gender}}</p>

<select name="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>

以上是 vue学习笔记三:常见的表单绑定 的全部内容, 来源链接: utcz.com/z/378248.html

回到顶部