JSP实现页面自动跳转.doc

上传人:m**** 文档编号:561276286 上传时间:2023-08-15 格式:DOC 页数:3 大小:32KB
返回 下载 相关 举报
JSP实现页面自动跳转.doc_第1页
第1页 / 共3页
JSP实现页面自动跳转.doc_第2页
第2页 / 共3页
JSP实现页面自动跳转.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《JSP实现页面自动跳转.doc》由会员分享,可在线阅读,更多相关《JSP实现页面自动跳转.doc(3页珍藏版)》请在金锄头文库上搜索。

1、一些页面自动跳转的实现 功能:8秒后,自动跳转到同目录下的return.html文件 1)html的实现2)javascript的实现 setTimeout(javascript:location.href=return.html, 8000); 3)结合了倒数的javascript实现(IE)8var second = totalSecond.innerText;setInterval(redirect(), 1000);function redirect() totalSecond.innerText=-second; if(second0) location.href=return.ht

2、ml;3)结合了倒数的javascript实现(firefox) var second = document.getElementById(totalSecond).textContent; setInterval(redirect(), 1000); function redirect() document.getElementById(totalSecond).textContent = -second; if (second 0) location.href = return.html; 4)解决Firefox不支持innerText的问题8if(navigator.appName.in

3、dexOf(Explorer) -1) document.getElementById(totalSecond).innerText = my text innerText; else document.getElementById(totalSecond).textContent = my text textContent;5)整合3)和3)8 var second = document.getElementById(totalSecond).textContent; if (navigator.appName.indexOf(Explorer) -1) second = document.

4、getElementById(totalSecond).innerText; else second = document.getElementById(totalSecond).textContent; setInterval(redirect(), 1000); function redirect() if (second -1) document.getElementById(totalSecond).innerText = second-; else document.getElementById(totalSecond).textContent = second-; 不在jsp页面中嵌套java代码片段function delayedRedirect()window.location = http:/localhost:8080/redirect/login.jsp;3秒钟后将自动跳转到登陆页面

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号