你好,请问在JSP中function跳转页面?如下所示,帮帮忙看看

页面a.jsp中,通过一个action在xml配置文件中跳转到b.jsp。
我想在b.jsp关闭的同时,蹦到一个指定的JSP页面,并刷新。
该怎么做呢?

呼如林
浏览 634回答 2
2回答

有只小跳蛙

JSP中function跳转页面的实现方法是window.location.href。javascript中的location.href有很多种用法,主要如下。self.location.href="/url" 当前页面打开URL页面location.href="/url" 当前页面打开URL页面windows.location.href="/url" 当前页面打开URL页面,前面三个用法相同。this.location.href="/url" 当前页面打开URL页面parent.location.href="/url" 在父页面打开新页面top.location.href="/url" 在顶层页面打开新页面如果页面中自定义了frame,那么可将parent self top换为自定义frame的名称,效果是在frame窗口打开url地址此外,window.location.href=window.location.href;和window.location.Reload()和都是刷新当前页面。区别在于是否有提交数据。当有提交数据时,window.location.Reload()会提示是否提交,window.location.href=window.location.href;则是向指定的url提交数据
打开App,查看更多内容
随时随地看视频慕课网APP