问题
half way through building a website an iframe on my page has disappeared when the webpage is viewed in chrome. The iframe is still visible in firefox, ie, safari and opera. All browsers are up to date.
<body>
<div id="apDiv9" style="text-align: center; position: fixed;"><ul id="menu">
<li></li>
<li><a href="newarrivals.html" target="content">New Arrivals</a> </li>
<li><a href="yardsale.html" target="content">Yard Sale</a> </li>
<li><a href="carsale.html" target="content">Car Sales</a> </li>
<li><a href="houserental.html" target="content">House Rental</a></li>
<li><a href="hotspots.php" target="content">Hot Spots</a> </li>
<li>
<a href="events.html" target="content">Events</a> </li>
<li>
<a href="chatter.html" target="content">Chatter</a>
<li></li><iframe height="30px" width="100%" scrolling="no" frameborder="0" id="frmFile" src="marquee.html" onload="LoadFile();"></iframe>
</ul>
</li>
This is the iframe which sources a marquee from a seperate html file, it sits just under the menu. Please help. I have only included a snippet of code.
The error in the chrome console says Uncaught ReferenceError: LoadFile is not defined
回答1:
Just remove this line form your HTML <head>
section:
<meta http-equiv="X-FRAME-OPTIONS" content="DENY">
来源:https://stackoverflow.com/questions/22918353/iframe-not-displayed-in-chrome