<iframe src="1.php" id="1"></iframe> <iframe src="1.php" id="2"></iframe> And in the 1.php script, but it takes the id of the first iframe, but it’s necessary that its parent:
$('html').attr('id', $('iframe',top.document).attr('id')); Thank.
<iframe src="1.php" id="1"></iframe> <iframe src="1.php" id="2"></iframe> And in the 1.php script, but it takes the id of the first iframe, but it’s necessary that its parent:
$('html').attr('id', $('iframe',top.document).attr('id')); Thank.
Use frameElement to access the element that contains the current page:
$('html').attr('id', frameElement.id); So try it.
<iframe src="1.php?id=2" id="2"></iframe> What to do next - I hope it is clear.
Source: https://ru.stackoverflow.com/questions/613646/
All Articles