vue.js

view 视图层 model 模型层 viewmodel Vue层  这是mvvm模型

<html>
    <head>
    </head>
    <body>
        <div id="myview">
            {{username}}
        </div>
        
    </body>
    
    <script src="${pageContext.request.contextPath}/js/vue.js"></script>
    
    <script>
        var mymodel = {
            username:"zss",
            age:18
        }
        
        var myviewmodel = new Vue({
            el:"#myview",
            data:mymodel
        });
    
    </script>

</html>

posted @ 2017-11-29 08:44  竹枝  阅读(184)  评论(0)    收藏  举报