「Javascript/vue/helloworld」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <script src="https://unpkg.com/vue@2.4.4/dist/vue.min.js"></script> </head> <body> <div i...」) |
|||
| 行1: | 行1: | ||
| + | <pre> | ||
<!DOCTYPE html> | <!DOCTYPE html> | ||
<html lang="ja"> | <html lang="ja"> | ||
| 行13: | 行14: | ||
</body> | </body> | ||
</html> | </html> | ||
| + | </pre> | ||
helloworld.js | helloworld.js | ||
2018年4月13日 (金) 17:32時点における版
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<script src="https://unpkg.com/vue@2.4.4/dist/vue.min.js"></script>
</head>
<body>
<div id="column1">
<p>{{text}}</p>
<p><span v-text="text"></span></p>
</div>
<script src="helloworld.js"></script>
</body>
</html>
helloworld.js
new Vue({
el: '#column1',
data: {
text: 'ほげほげ'
}
});
