image.png

代码

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue.js 中 v-for 循环指令-简易数组的使用</title>
    <script src="//static.gzj2001.com/vue/vue.js"></script>
</head>
<body>
    <div id="app"><ul><li v-for="list in msg">{{list}}</li></ul></div>
    <script>
        new Vue({
            el:"#app",
            data:{
                msg:["1","2","3","4","5","6","7","8","9"]
            }
        })
    </script>
</body>
</html>