jquery遍历字符串数组

var strArr = ["111", "222", "333"];
// 只打印元素
$.each(strArr, function(){
	console.log(this);
});
// 打印索引和元素
$.each(strArr, function(i, item){
	console.log(i, item);
});

参考链接:https://www.cnblogs.com/zhouyangla/p/5606528.html

猜你喜欢

转载自blog.csdn.net/u010999809/article/details/81074183