如何使用原生javascript或者jQuery把比如以下兩個數(shù)組對應(yīng)輸出到同一個ul列表里面?//顯示文本var Texts = [ "http://www.url.com0", "http://www.url.com1", "http://www.url.com2", "http://www.url.com3", "http://www.url.com4", "http://www.url.com5", "http://www.url.com6",]//文本對應(yīng)的鏈接var Links = [ "列表文本內(nèi)容0", "列表文本內(nèi)容1", "列表文本內(nèi)容2", "列表文本內(nèi)容3", "列表文本內(nèi)容4", "列表文本內(nèi)容5", "列表文本內(nèi)容6",]輸出一個像這樣的列表:<li><a href="http://www.url.com0">列表文本內(nèi)容0</a></li><li><a href="http://www.url.com1">列表文本內(nèi)容1</a></li><li><a href="http://www.url.com2">列表文本內(nèi)容2</a></li><li><a href="http://www.url.com3">列表文本內(nèi)容3</a></li><li><a href="http://www.url.com4">列表文本內(nèi)容3</a></li><li><a href="http://www.url.com5">列表文本內(nèi)容5</a></li><li><a href="http://www.url.com6">列表文本內(nèi)容6</a></li>
js兩個length相同的數(shù)組如何同時輸出到同一個列表?
陪伴而非守候
2018-12-20 19:10:05