同一页面中上层frame对下层frame进行页面跳转:
方法:
<script language="javascript">
function onSearch(form){
var insuredid = form_list.appInsuredId.value;
var url = "/egis/displayAppCoverages.do?appInsuredId=" + insuredid;
var frm = window.parent.frames;
frm(1).location=url; //序号从0开始,1为下层序号
}
</script>
方法:
<script language="javascript">
function onSearch(form){
var insuredid = form_list.appInsuredId.value;
var url = "/egis/displayAppCoverages.do?appInsuredId=" + insuredid;
var frm = window.parent.frames;
frm(1).location=url; //序号从0开始,1为下层序号
}
</script>
tragedy(我要读书),代码没有看明白,能解释一下么?
<script language="javascript">
function onSearch(form){
var url = "......";
var frameCollection = window.parent.frames; 取父类窗口的所以frame的集合
frameCollection(1).location=url; //序号从0开始,序号为1就是trMainFrame.aspx
这个页面frame
}
</script>
好像frame 没有location这个属性.................
showWindow.html
---------------------------
<HTML>
<HEAD>
<TITLE>模态窗口打开,涉及技术:frameset框架,上下两层</TITLE>
<script language="javascript">
var obj;
function openWindow(){
window.open('./frameset.html');
}
</script>
</HEAD><BODY><input type="button" value="打开模态窗口" onclick="openWindow()">
</BODY>
</HTML>
child.html
---------------------------
<html><script language="javascript">
function doLocation(){
var frameCollection = window.parent.frames;
frameCollection[2].location="./another.html";
}
</script>
<body onbefor>
<form name="form1" action="">
<input type="button" value="返回" onclick="doLocation()">
</form>
</body>
</html>frameset.html
---------------------------
<frameset rows="30%,*" cols="*" frameborder="NO" border="0" framespacing="0">
<frame src="child.html" name="topFrame" noresize >
<frameset rows="50%,50%" cols="700,*" framespacing="0" frameborder="NO" border="0">
<frame src="child.html" name="leftFrame" frameborder="NO">
<frame src="child.html" name="mainFrame" scrolling="no">
</frameset>
</frameset>
another.html
---------------------------
<HTML>
<HEAD>
</HEAD>
<BODY>
this is another page
</BODY>
</HTML>