我正在设计一个简单的ASPX
页面,其中有两个div's
。第一个div有静态内容。在第二个我想要的内容是动态的。我希望用户在查询字符串中提供URL,并且需要在我的第二个div中显示该URL。到目前为止,我已经做到了。从查询字符串获取网址并将其加载到div中
的Index.aspx:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Frames Example</title>
<script type="text/javascript">
function LoadQueryPage() {
var str = <%= new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(Request.QueryString["pagename"]) %>
$("#siteloader")
.html('<object data=' + str + '/>');
}
</script>
</head>
<body>
<div style="min-height: inherit; height: 100px;">
Farhan S. Mukadam
</div>
<div>
<object type="text/html" data="http://validator.w3.org/" width="800px" height="600px" style="overflow:auto;border:5px ridge blue">
</object></div>
</body>
</html>
但是,这是行不通的。有人可以请帮助。
包括jQuery的'这不是working' ...什么是错误...? – NoobEditor
它从Querystring中获取值。我不完全清楚。我从某处获得了这个JS代码。 –
其中是'GetParameterValues'的执行方式 –