IE以外的浏览器不支持javascript和iframe [英] javascript and iframe not supported in browsers other than IE

查看:345
本文介绍了IE以外的浏览器不支持javascript和iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE浏览器中运行了一个带iframe和javascript的简单html文件,但在Safari和Firefox等其他浏览器中无法正常工作。

I run a simple html file with an iframe and javascript working fine in IE Browser, but it is not working in other browsers like safari,firefox.

在Safari中

请说明为什么Safari浏览器不支持它? iframe的替代方案是什么?

Please clarify why safari doesn't support it? what are the alternatives for iframe?

推荐答案

您可以使用< embed> 标记,其行为类似于iframe

You can use <embed> tag ,which behaves like iframe

以下是示例

<!doctype html >
<html >
<head>
<title>embed  Tag </title>
</head>
<body>
<p><b>Example of embed tag in HTML5.</b></p>
<embed src="http://www.w3schools.com" height="300" width="300" />
</body>
</html>

虽然您也可以在所有浏览器上使用iframe

While you can also use iframes on all browser

这里是示例

<!DOCTYPE html>
<html>
<body>

<iframe src="http://www.w3schools.com">
  <p>Your browser does not support iframes.</p>
</iframe>

</body>
</html>

您是否要对iframe进行其他操作?

Are you trying to do any different for iframe ?

这篇关于IE以外的浏览器不支持javascript和iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆