wiondow.open("SelectCustomer.htm?Empid=2")
打开一个框架集:
<html>
<frameset cols="25%,75%" frameborder="1">
<frame name="ArrCustomerleft" src='ArrCustomerLeft.aspx?Empid=<%= Request["Empid"] %>'>
<frame name="ArrCustomerRight" src="ArrCustomerList.aspx" scrolling="auto">
</frameset>
</html>
这个框架集中的ArrCustomerLeft.aspx页面怎么取Empid这个查询字符串啊?
打开一个框架集:
<html>
<frameset cols="25%,75%" frameborder="1">
<frame name="ArrCustomerleft" src='ArrCustomerLeft.aspx?Empid=<%= Request["Empid"] %>'>
<frame name="ArrCustomerRight" src="ArrCustomerList.aspx" scrolling="auto">
</frameset>
</html>
这个框架集中的ArrCustomerLeft.aspx页面怎么取Empid这个查询字符串啊?
<frameset cols="25%,75%" frameborder="1">
<frame name="ArrCustomerleft" src="javascript:GetUrl();">
<frame name="ArrCustomerRight" src="ArrCustomerList.aspx" scrolling="auto">
</frameset>
<script>
function GetUrl(){
var parWin = parent.window.opener;
var a = parWin.document.all("buttonID").value;
url = "ArrCustomerLeft.aspx?Empid="+id;
return url;
}
</script></html>
<html>
<frameset cols="25%,75%" frameborder="1">
<frame name="ArrCustomerleft" src="javascript:GetUrl();">
<frame name="ArrCustomerRight" src="ArrCustomerList.aspx" scrolling="auto">
</frameset>
<script>
function GetUrl(){
var parWin = parent.window.opener;
var a = parWin.document.all("buttonID").value;
url = "ArrCustomerLeft.aspx?Empid="+id;
return url;
}
</script></html>这样弹出的框架集左边是显示“该页无法显示”的错误。无法获得正确的网址。
楼主可以把扩展名改成.aspx在页首加<%Page%>
打开一个框架集:
<html>
<frameset cols="25%,75%" frameborder="1">
<frame name="ArrCustomerleft" src='ArrCustomerLeft.aspx?Empid=<%= Request["Empid"] %>'>
<frame name="ArrCustomerRight" src="ArrCustomerList.aspx" scrolling="auto">
</frameset>
</html>
然后
只需要在 ArrCustomerLeft.aspx的PageLoad事件里 接收值
Label1.Text=Request["Empid"].tostring();经测试可以取到值的
用wiondow.open("SelectCustomer.htm?Empid=2")打开的话
<frame name="ArrCustomerleft" src='ArrCustomerLeft.aspx?Empid=<%= Request["Empid"] %>'>
取的Label1.Text=Request["Empid"].tostring()是“<%= Request["Empid"] %>”。
我早就试过了。
高手帮忙啊!
<script runat=server language=C#>
private string GetUrl()
{
string url = "ArrCustomerLeft.aspx?Empid="+Request["Empid"].ToString(); return url;
}</script>
<frameset cols="25%,75%" frameborder="1">
<frame name="ArrCustomerleft" src="<%=GetUrl()%>">
<frame name="ArrCustomerRight" src="ArrCustomerList.aspx" scrolling="auto">
<noframes>
<pre id="p2">
================================================================
关于完成此垂直拆分框架集的说明
1. 为“left”框架添加 src="" 页的 URL。
2. 为“right”框架添加 src="" 页的 URL。
================================================================
</pre>
<p id="p1">
此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。
</p>
</noframes>
</frameset>
</html>