Vue中v-model使用方法
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>v-on:mouseover</title><script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script...
·
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>v-on:mouseover</title>
<script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
</head>
<body>
<div id="app">
<form action="" method="post">
账号:<input type="text" name="username" v-model="user.username" /><br />
密码:<input type="text" name="username" v-model="user.password" />
</form>
</div>
</body>
<script type="application/javascript">
new Vue({
el:"#app",
data:{
user:{
username:"老赵",
password:"123456"
}
}
})
</script>
</html>
效果图:
更多推荐
已为社区贡献4条内容
所有评论(0)