IFRAME without src attribute on HTTPS in Internet Explorer

IFRAME without src attribute on HTTPS in Internet Explorer,第1张

This took me quite some time to debug. Once again it made me realize why I hate hate hate Internet Explorer.

If you have a webpage on a HTTPS server with the following iframe code where you leave the src out:
<iframe id="if"></iframe>
and you view the page in Internet Explorer you'll get the following very descriptive warning.

Clicking on the More Info button doesn't give you which items it's referring to, but just a help file.

Mozilla Firefox correctly doesn't produce this error.

Leaving the src attribute out of the iframe is common, when you want to fill the src attribute programmatically.

The solution you ask? Create a blank.html page and then write:
<iframe id="if" src="blank.html"></iframe>
The blank.html only contains <html></html>


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/2082363.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-07-22
下一篇 2022-07-22

发表评论

登录后才能评论

评论列表(0条)

保存