下面是主页index.jsp的主要代码
<frameset rows="90%,*" cols="*" frameborder="NO" border="0" framespacing="0">
<frameset rows="*" cols="22%,*" frameborder="NO" border="0" framespacing="0">
<frame src="left.jsp" name="leftFrame" scrolling="NO">
<% String str = (String)session.getAttribute("isLog"); %>
<% if (str == null){ %>
<frameset rows="60%,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="head.jsp" name="headFrame" scrolling="NO" noresize >
<frame src="welcome.jsp" name="welcomeFrame" scrolling="NO" noresize >
<% } else {%>
<frameset rows="15%,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="head.jsp" name="headFrame" scrolling="NO" noresize >
<frame src="body.jsp" name="bodyFrame" scrolling="NO">
<% } %>
</frameset>
</frameset>
<frame src="footer.htm" name="footerFrame"scrolling="NO">
</frameset>
其中left.jsp上有登录界面,在其上输入用户名密码后按submit,我使之调用parent.location.reload();
为了让index.jsp判断是否登录来刷新其他页面,就像上面代码中写的那样
但是现在每当parent.location.reload();刷新整个页面后,仍旧像未登录一样!左右都没有刷新!一定要手动按一下F5才正确地刷新!
请问应该如何刷新index.jsp呀! 我需要达到的目的是登录后自动刷新整个页面
左边显示欢迎你XXX
右边不显示welcom.jsp而显示body.jsp,就像上面代码中写的那样
<frameset rows="90%,*" cols="*" frameborder="NO" border="0" framespacing="0">
<frameset rows="*" cols="22%,*" frameborder="NO" border="0" framespacing="0">
<frame src="left.jsp" name="leftFrame" scrolling="NO">
<% String str = (String)session.getAttribute("isLog"); %>
<% if (str == null){ %>
<frameset rows="60%,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="head.jsp" name="headFrame" scrolling="NO" noresize >
<frame src="welcome.jsp" name="welcomeFrame" scrolling="NO" noresize >
<% } else {%>
<frameset rows="15%,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="head.jsp" name="headFrame" scrolling="NO" noresize >
<frame src="body.jsp" name="bodyFrame" scrolling="NO">
<% } %>
</frameset>
</frameset>
<frame src="footer.htm" name="footerFrame"scrolling="NO">
</frameset>
其中left.jsp上有登录界面,在其上输入用户名密码后按submit,我使之调用parent.location.reload();
为了让index.jsp判断是否登录来刷新其他页面,就像上面代码中写的那样
但是现在每当parent.location.reload();刷新整个页面后,仍旧像未登录一样!左右都没有刷新!一定要手动按一下F5才正确地刷新!
请问应该如何刷新index.jsp呀! 我需要达到的目的是登录后自动刷新整个页面
左边显示欢迎你XXX
右边不显示welcom.jsp而显示body.jsp,就像上面代码中写的那样
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货