Vue textarea文本区域v-model数据绑定
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, init
·
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
msg: {{ msg }}
<br>
<br>
<textarea id="textarea" cols="30" rows="10" v-model="msg" placeholder="请输入"></textarea>
</div>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
new Vue({
el: '#app',
data() {
return {
msg: '我是初始数据'
}
}
});
</script>
</body>
</html>
更多推荐
已为社区贡献12条内容
所有评论(0)