如何使用jQuery测试元素是否存在于iFrame中,如果确实如此,如何选择iFrame? 试试这个它会对你有用. var requiredIframe;$("iframe").each(function(){ if($(this).contents().find("elementYouAreLookingFor").length){ r
var requiredIframe;
$("iframe").each(function(){
if($(this).contents().find("elementYouAreLookingFor").length){
requiredIframe = $(this);
return false;
}
});
