Frameset的使用

1.frameSet布局页面
<frameset rows="200,*">
<frame src="top.jsp" name="topFrame"/>
<frameset cols="20%,*">
<frame src="left.jsp" name="leftFrame"/>
<frame src="right.jsp" name="rightFrame"/>
</frameset>
</framset>

2.跳出frameset框架转到新的页面
window.parent.location.href('http://localhost:8080/SpringMVC/login.jsp')
替换frameset框架中左右两边的部分(其中rightFrame和leftFrame为frame的名字)
parent.leftFrame.location.href("c.jsp");
parent.rightFrame.location.href("b.jsp");

点击链接替换frameset框架中的frame部分
<script>
function changeLR(){
parent.leftFrame.location.href("left.jsp");
parent.rightFrame.location.href("index.jsp");

}
function change(){
parent.leftFrame.location.href("http://localhost:8080/TestSession/left.jsp");
parent.rightFrame.location.href("http://localhost:8080/TestSession/count");
}
window.οnlοad=function(){
var flag=document.getElementById("flag").value;
//alert(flag=="true");
if(flag=="true"){
change();
}
}
</script>

使用空链接跳转
<a href="#" οnclick="changeLR();">SpringMVC</a>
带连接(action)的跳转:
<a href="http://localhost:8080/TestSession/login?username=<%=request.getParameter("username") %>&psw=<%=request.getParameter("password") %>" >TestSession</a>
<input name="flag" type="hidden" value="<%=request.getParameter("flag") %>" id="flag"/>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值