<iframeid="foobariframe"src="https://www.heise.de"height="50"width="800"></iframe><script>//<![CDATA[document.onreadystatechange=function(){if(document.readyState==="complete"){// Using Vanilla JSconsole.log('Using querySelector');varquerySelectIframe=document.querySelector('#foobariframe');if(typeofquerySelectIframe==='undefined'||querySelectIframe===null){console.error('Unable to find iframe. Aborting');returnfalse;}console.dir(querySelectIframe);// Using bloated jQueryconsole.log('Using jQuery');console.dir($('#foobariframe').contents())}}//]]></script>
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.