Skip to content

Instantly share code, notes, and snippets.

@PKTseng
Created August 11, 2020 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PKTseng/ee6c585dc89f9773247cea50e5ac6040 to your computer and use it in GitHub Desktop.
Save PKTseng/ee6c585dc89f9773247cea50e5ac6040 to your computer and use it in GitHub Desktop.
radio
<div id="app">
<input type="radio" id="chk1" value="male" v-model="gender">
<label for="chk1">male</label>
<input type="radio" id="chk2" value="female" v-model="gender">
<label for="chk2">female</label>
<h1>{{gender}}</h1>
</div>
new Vue({
el:"#app",
data:{
gender: 'male',
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment