How can I point to the page inside the iframe if the parent itself is also inside the iframe?
Explanation:
My home.html contains iframe
<iframe src="sample.html"></iframe>
I need to determine if home.html (i.e. the parent element of sample.html ) is inside an iframe.
Code in sample.html :
if(self==window) { alert('home.html is not in iframe'); } else { alert('home.html is in iframe'); }
My question is not duplicated. This is a different case.
javascript jquery iframe
Mohan Ram Jan 04 2018-11-14T00: 00Z
source share