有没有办法检测浏览器是否支持iframe?
答案 0 :(得分:5)
也许这会起作用?
<强> HTML 强>:
<iframe ...>
<script type="text/javascript">var iFramesSupported = false;</script>
</iframe>
答案 1 :(得分:2)
创建一个虚拟iframe并在javascript中测试其属性。
答案 2 :(得分:1)
你总是可以测试它......
<iframe src="user_can_see_iframes.php" width="0" height="0">
<p>iframes not supported</p>
</iframe>
答案 3 :(得分:1)
所有主流桌面浏览器都支持iFrame。
如果您的意思是在移动环境中,我设法在Google上找到了这个:http://johannburkard.de/blog/www/mobile/iframe-support-on-mobile-devices.html
某些较旧的设备不支持iframe。