循环遍历数组

var typeAll=["a","b","c"];

$.each(typeAll, function(index, value){

    $(".lie table tr td .aclass").append("<a>"+ value + "</a>");

});

/读取数组第几个元素

var typeAll=["a","b","c"];

$(".lie table tr td .aclass").text(typeAll[0]);

posted @ 2019-04-17 10:13  梁晓天  阅读(149)  评论(0)    收藏  举报