N年前写的一个QUERY, DETAIL框架,也可以模拟实现保持
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta content="
http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</head>
<script language="javascript">
var hidePageHeight = 0;//此参数设置隐藏页的高度,默认为0,测试时可修改
// 提供Query页面使用,调用此函数,将显示Detail页面
// 参数
// 1.url(string): 详细页面的url,可以包含参数
function goDetail(url)
{
document.all("FramMain").rows = hidePageHeight + ",*";
if (url.length>0) frames["Detail"].location.href = url;
}
// 提供Detail页面使用,调用此函数,将显示Query页面,同时提交操作
// 参数
// 1.controlName(string) : 希望引发动作的控件名称,String
// 2.action(string) : 动作类型,可能为 click , doback , submit
// 请小写
function goQueryAndSubmit(controlName,action)
{
document.all("FramMain").rows = "*," + hidePageHeight;
if (action == 'click')
{
document.frames("Query").document.getElementById(controlName).click();
}
else if (action == 'doback')
{
document.frames("Query").__doPostBack(document.getElementById(controlName).value, "");
}
else if (action == 'submit')
{
document.frames("Query").document.getElementById(controlName).submit();
}
}
// 提供Detail页面使用,调用此函数,将显示Query页面,但不提交操作
function goQuery()
{
document.all("FramMain").rows = "*," + hidePageHeight;
}
</script>
<frameset rows="*,<script>document.write(15)</script>" border="0" id="FramMain">
<frame name="Query" id="Query" src="Query.aspx">
<frame name="Detail" src="" noresize >
<noframes>
</noframes>
</frameset>
</html>