【发布时间】:2014-01-09 15:52:47
【问题描述】:
我正在设计一个简单的ASPX 页面,它有两个div's。第一个 div 具有静态内容。第二个我想要动态的内容。我希望用户在查询字符串中提供 URL,并且我需要在我的第二个 div 中显示该 URL。到目前为止,我已经做到了。
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>
但这不起作用。有人可以帮忙吗?
【问题讨论】:
-
this is not working...错误是什么...?? -
它从 Querystring 中获取值。我不确切知道。我从某个地方得到了这个 JS 代码。
-
GetParameterValues的实现在哪里 -
这是我的第二个代码。最初我有一些其他的代码。我会发布它。
-
错误是我的第二个 div 没有打开我在查询字符串中提供的 URL。
标签: javascript jquery html asp.net query-string