<!DOCTYPE html>
<html lang="zh"> <head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link href="../css/style.css" rel="stylesheet"> </head>
<body>
<div id="myApp">
<h1>表单复选框</h1>
<input type="checkbox" id="生化危机7" value="生化危机7" v-model="checkedGames">
<label for="生化危机7">生化危机7</label>
<input type="checkbox" id="模拟飞行" value="模拟飞行" v-model="checkedGames">
<label for="模拟飞行">模拟飞行</label>
<input type="checkbox" id="塞尔达传说" value="塞尔达传说" v-model="checkedGames">
<label for="塞尔达传说">塞尔达传说</label>
<br>
<p>您选择的游戏是: {{ checkedGames }}</p>
</div>
<script>
var myApp = new Vue({
el: '#myApp',
data: {
checkedGames: []
},
methods: {
},
});
</script>
</body> </html>
05-11 02:15
查看更多