<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>