我在我的asp网页中有一个iframe,我从代码后面动态加载url。 但在加载我的网址在iframe中时,它并未在Chrome和Safari浏览器中打开。 它在IE和FF中完美工作。Url不在谷歌浏览器和Safari中的iframe中加载
任何人都可以帮我解决这个问题。示例代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="a.aspx.cs" Inherits="Admin_Title_a" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<iframe id="ifrm" src="http://www.sample.com/" runat="server"></iframe>
</div>
</form>
</body>
</html>
代码背后:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Admin_Title_a : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
让我们看看后面的代码。 – 2012-04-10 14:07:39