1:循环遍历取值 var arr = new Array(); $(".plus-tag a span").each(function(i) { arr[i] = $(this).text(); }); console.log(arr, 55)//["11", "22"] 55 2:循环遍历通过id来查找该id对应的一组数据,并取出这组数据的另一个参数 function showDetail(msgId) { var datas = result
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <ti