all, I`ve a question about get iframe's element by attribute using javascript.
1.html
<iframe id="if" src="2.html">
<div attr="test">
2.html
<div attr="test">
I`ve already known that if parent page want to get the its element by attribute, we can use jQuery like
$("div[attr='test']")
But how can parent get it's iframe's element by attribute?
Please write some simple code for explain, great thanks!
Jarod
I`ve found out a solution and test fine:
$("iframe[data-label='if']").contents().find("div[attr='test']");
iframefrom the parent window, which is effectively impossible