Created
August 11, 2020 02:46
-
-
Save PKTseng/ee6c585dc89f9773247cea50e5ac6040 to your computer and use it in GitHub Desktop.
radio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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