嵌入对象:浏览器依赖?

时间:2011-07-27 19:47:14

标签: asp.net html firefox

我已经整理了一个在我的页面中嵌入了几个其他网页的Web应用程序。在Chrome和IE中它工作正常,但在Firefox中它表示需要一个缺少的插件。如果我点击“安装缺失的插件”,Firefox无法找到。奇怪的是,我页面上的所有内容都很好。这是Firefox中的错误吗?

这是我的标记:

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> 
    <fieldset id="total">
        <legend>Total Statistics</legend>
        <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Always">
            <ContentTemplate>
                <object data="http://sceedev16/flashboard.html" style="width: 100%; height:400px">
                    <embed src="http://sceedev16/flashboard.html" width="100%" height="400"></embed>
                </object>
                <asp:Timer ID="ui_timer" runat="server" Interval="60000" OnTick="Timer_Tick"></asp:Timer>
            </ContentTemplate>
        </asp:UpdatePanel>
    </fieldset>
</asp:Content>

2 个答案:

答案 0 :(得分:1)

<embed>标记是导致Firefox出现问题的原因。 Firefox不支持将文档用作<embed>标记中的源。它只能使用<object>标记:

<object data="http://sceedev16/flashboard.html" style="width: 100%; height:400px">
</object>

embedding a document有两个主要选项。为了更好的浏览器兼容性和更少的代码,我建议使用iframe:

<iframe src="http://sceedev16/flashboard.html" width="100%" height="400" />

答案 1 :(得分:0)

您是否为firefox安装了Flash / Shockwave插件?