{{msg}}不显示 帮我看一下怎么回事

来源:2-2 第一个vue应用

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>


写回答 关注

3回答

  • 不逃课
    2019-05-22 14:47:48
    已采纳

    vue.js引入进来了吗?而且new Vue   是大写的Vue

  • 墨涤
    2019-05-29 09:52:47
    <!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>


  • 墨涤
    2019-05-29 09:52:21
    <!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>


3小时速成 Vue2.x 核心技术

带你快速学习最流行的前端框架vue2.x的核心技术

82560 学习 · 487 问题

查看课程

相似问题