jQuery获取页面所有a标签对应的href属性值 var a = [];$("nav a").each(function(){a.push($(this).attr("href"))});return a;