我做的页面时用框架做的,我想在父框架a.html中点击一个连接弹出窗口,并且希望弹出的窗口悬浮在框架上面。
我弹出的框架中有很多个页面,要求有前进和后退到不同的页面
<iframe width=100% height=400 frameborder=0 scrolling=no src="1.html" id="pic"></iframe>
<a href="javascript:Page(-1)">上一页</a> <a href="javascript:Page(1)">下一页</a>
<script language="javascript">
var curId = 1;
var maxId = 4;
if (document.location.search)
curId = Number(document.location.search.split("?")[1].split("=")[1]);
document.getElementById("pic").src = curId + ".html";
function Page(id)
{
if ( id == 0 )
curId = Number(document.getElementById("page").value);
else
curId += id;
if ( curId < 1 )
curId = 1;
if ( curId > maxId )
curId = maxId;
document.getElementById("pic").src = curId + ".html";
}
</script>
跳转到第
<input id="page" type="text" size="5">
页
<input type="button" name="Submit" value="GO" onClick="Page(0)">
前进后退的页面中共有1.html,2.html,3.html,4.html几个页面,我在1.html页面中有个连接连接到3.html,可是这个时候点击1.html的链接到3.html后,再后退就不对了,
我弹出的框架中有很多个页面,要求有前进和后退到不同的页面
<iframe width=100% height=400 frameborder=0 scrolling=no src="1.html" id="pic"></iframe>
<a href="javascript:Page(-1)">上一页</a> <a href="javascript:Page(1)">下一页</a>
<script language="javascript">
var curId = 1;
var maxId = 4;
if (document.location.search)
curId = Number(document.location.search.split("?")[1].split("=")[1]);
document.getElementById("pic").src = curId + ".html";
function Page(id)
{
if ( id == 0 )
curId = Number(document.getElementById("page").value);
else
curId += id;
if ( curId < 1 )
curId = 1;
if ( curId > maxId )
curId = maxId;
document.getElementById("pic").src = curId + ".html";
}
</script>
跳转到第
<input id="page" type="text" size="5">
页
<input type="button" name="Submit" value="GO" onClick="Page(0)">
前进后退的页面中共有1.html,2.html,3.html,4.html几个页面,我在1.html页面中有个连接连接到3.html,可是这个时候点击1.html的链接到3.html后,再后退就不对了,
<iframe width=100% height=400 frameborder=0 scrolling=no src="1.html" id="pic"></iframe>
里的src或许根本没有改变,所以你在“后退”Page(-1)自然什么也没有了
你可以 your_window.location.go(1/-1)