表单控件
2018-04-02 本文已影响0人
知识分享share
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>vue</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js">
</script>
<style>
</style>
</head>
<body>
<h1>表单控件</h1>
<div id="app-one">
<input type="checkbox" id="checkbox" v-model="checked">
{{checked}}
<p>
<input type="checkbox" id="jack" value="vue" v-model="checkedNames">vue
<input type="checkbox" id="jack" value="react" v-model="checkedNames">react
<input type="checkbox" id="jack" value="angular" v-model="checkedNames">angular
</p>
{{checkedNames}}
</div>
</body>
</html>
<script>
var vm = new Vue({
el: "#app-one",
data:{
checked:true,
checkedNames:[]
},
});
</script>