wangshuhua
2019-05-22 10:46
<body>
<div id="app">
<div class="bg">
hello world!! </br>
{{msg}}
</div>
</div>
<script>
new vue({
el: '#app',
data: {
msg: "勇士西部总冠军"
}
})
</script>
</body>
vue.js引入进来了吗?而且new Vue 是大写的Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="app">
<div class="bg">
hello world!! </br>
{{msg}}
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
new Vue({
el: '#app',
data: {
msg: "勇士西部总冠军"
}
})
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="app">
<div class="bg">
hello world!! </br>
{{msg}}
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
new Vue({
el: '#app',
data: {
msg: "勇士西部总冠军"
}
})
</script>
</body>
</html>
答案已找到
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
3小时速成 Vue2.x 核心技术
82567 学习 · 499 问题
相似问题
回答 3
回答 2