<html>
<head>
<script src='js/vue.js'></script>
</head>
<body>
<div id="example">
<input type='radio' id='wuhan' value='武汉' v-model='city'/>
<label for='wuhan'>武汉</label>

<input type='radio' id='xian' value='西安' v-model='city'/>
<label for='xian'>西安</label>

<input type='radio' id='hangzhou' value='杭州' v-model='city'/>
<label for='hangzhou'>杭州</label><br>

<span>欲望都市:{{ city }}</span>
</div>
</body>


<script type='text/javascript'>
new Vue({
el: '#example',
data: {
flag: true,
city: ''
},
methods: {

},
computed: {

},
created() {

}
});
</script>
</html>
Logo

前往低代码交流专区

更多推荐