vue教程1-02 data里面存储数据
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>

    </style>
    <script src="vue.js"></script>
    <script>
        window.onload=function(){
            new Vue({
                el:'body',
                data:{
                    msg:'welcome vue',
                    msg2:12,
                    msg3:true,
                    arr:['apple','banana','orange','pear'],
                    json:{a:'apple',b:'banana',c:'orange'}
                }
            });
        };
    </script>
</head>
<body>
    <input type="text" v-model="msg">
    <input type="text" v-model="msg">
    <br>
    {{msg}}
    <br>
    {{msg2}}
    <br>
    {{msg3}}

    <br>
    {{arr}}
    <br>
    {{json}}
</body>
</html>

 

vue教程1-02 data里面存储数据

 

相关文章:

  • 2022-01-02
  • 2022-01-07
  • 2021-12-29
  • 2022-01-17
  • 2021-08-26
  • 2021-06-30
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2021-10-31
  • 2021-07-16
  • 2021-07-29
  • 2021-06-05
  • 2021-08-19
  • 2022-12-23
相关资源
相似解决方案