「Vue.js入門」v-textでテキスト文字列を出力するサンプル
説明
DOM要素の内側をテキストノードとしてすべて書き換えます。
使用例
<div id="arkgame">
<div v-text="cft"></div>
<div>1123456799{{purpose}}</div>
</div>
<script>
var cftp = new Vue({
el: '#arkgame',
data: {
cft: 'abcdef123',
purpose: 'study skill in arkgame.com'
}
});
</script>
<div id="arkgame">
<div v-text="cft"></div>
<div>1123456799{{purpose}}</div>
</div>
<script>
var cftp = new Vue({
el: '#arkgame',
data: {
cft: 'abcdef123',
purpose: 'study skill in arkgame.com'
}
});
</script>
<div id="arkgame"> <div v-text="cft"></div> <div>1123456799{{purpose}}</div> </div> <script> var cftp = new Vue({ el: '#arkgame', data: { cft: 'abcdef123', purpose: 'study skill in arkgame.com' } }); </script>