Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
iframe src は次のようなものです:-コンテンツは動的です。サーバー側またはクライアント側で JavaScript を使用して、iframe 内のタグまたはタグの<iframe src="http://mysite.com/testing.php?id=7632762"></iframe> 数を調べるにはどうすればよいですか? -ありがとうございました<div><li><p>
<iframe src="http://mysite.com/testing.php?id=7632762"></iframe>
<div>
<li>
<p>
iframe src がソース ページと同じドメインにあり、そのリソースの読み込みが完了していると仮定すると、次を使用できます。
$("iframe").contents().find("div").length
$("iframe>div").each(function(){counter++;})
他の要素についても同様です。iframe に ID を追加すると簡単です。