vue学习——页面中引入vue

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="../js/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="root">
        <h1>我是{{name}},我今年18</h1>
    </div>
</body>

<script type="text/javascript">
 Vue.config.productionTip = false
 
    new Vue({
        el: '#root',
        data:{
            name: '张三'
        }
    })
</script>

</html>
posted @ 2022-05-04 16:45  comeoncode  阅读(342)  评论(0编辑  收藏  举报