你必须使用 .find() 如图所示:
$("a").each(function() { var phonenumber = $(this).find("h3").text(); $(this).attr("href", phonenumber); });
Fiddle