一段倒计时5秒跳转的另一个页面中的代码,却无法运行????
使用FireBug调试,发现根本取不到"time"这个Id??????
高手帮解答一下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Blog注册_非法</title>
<script language="JavaScript" type="text/javascript">
function delayURL(url) {
alert("1");
var delay = document.getElementById("time").innerHTML;
if(delay > 0) {
delay--;
document.getElementById("time").innerHTML = delay;
} else {
window.top.location.href = url;
}
alert("3");
setTimeout("delayURL('" + url + "')", 1000); //delayURL(http://wwer)
}
</script>
<script type="text/javascript">delayURL("http://localhost:8888/Rss_Blog_01/register.jsp");</script>
</head><body>
<h2>您的输入有误,<span id="time">5</span>秒钟后自动跳转,如果不跳转,请点击下面链接</h2>
<!--<s:fielderror></s:fielderror>-->
<a href="http://localhost:8888/Rss_Blog_01/register.jsp">返回</a>
</body>
</html>
使用FireBug调试,发现根本取不到"time"这个Id??????
高手帮解答一下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Blog注册_非法</title>
<script language="JavaScript" type="text/javascript">
function delayURL(url) {
alert("1");
var delay = document.getElementById("time").innerHTML;
if(delay > 0) {
delay--;
document.getElementById("time").innerHTML = delay;
} else {
window.top.location.href = url;
}
alert("3");
setTimeout("delayURL('" + url + "')", 1000); //delayURL(http://wwer)
}
</script>
<script type="text/javascript">delayURL("http://localhost:8888/Rss_Blog_01/register.jsp");</script>
</head><body>
<h2>您的输入有误,<span id="time">5</span>秒钟后自动跳转,如果不跳转,请点击下面链接</h2>
<!--<s:fielderror></s:fielderror>-->
<a href="http://localhost:8888/Rss_Blog_01/register.jsp">返回</a>
</body>
</html>
解决方案 »
- 怎样在java代码里获取一个json对象,然后对其进行排序,排好了之后,再返回给json?
- DWR返回的List是null
- jfreechart 刻度
- 老问题 struts2 action跳转传参乱码!!!
- java.io.IOException: failed to read '2' bytes from InputStream;
- 关于网站时间
- 加载JDBC驱动的问题
- 如何能隐藏网页文件的后缀名?
- 用JSP编写FTP服务器的帐号注册页面
- xfire java.lang.IllegalStateException: Could not initialize Service
- wps打开jxl导出的xls文件
- tomcat 项目可以不放在ROOT下吗
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Blog注册_非法</title>
</head><body>
<h2>您的输入有误,<span id="timeer">5</span>秒钟后自动跳转,如果不跳转,请点击下面链接</h2>
<!--<s:fielderror></s:fielderror>-->
<a href="http://localhost:8888/Rss_Blog_01/register.jsp">返回</a>
<script language="JavaScript" type="text/javascript">
function delayURL(url) {
var delay = document.getElementById("timeer").innerHTML;
if(delay > 0) {
delay--;
document.getElementById("timeer").innerHTML = delay;
} else {
window.top.location.href = url;
}
alert("3");
setTimeout("delayURL('" + url + "')", 1000); //delayURL(http://wwer)
}
delayURL("http://localhost:8888/Rss_Blog_01/register.jsp");
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Blog注册_非法</title>
<script language="JavaScript" type="text/javascript">
function delayURL(url) {
alert("1");
var delay = document.getElementById("time").innerHTML;
if(delay > 0) {
delay--;
document.getElementById("time").innerHTML = delay;
} else {
window.top.location.href = url;
}
alert("3");
setTimeout("delayURL('" + url + "')", 1000); //delayURL(http://wwer)
}
</script>
</head><body onload="delayURL('http://localhost:8888/Rss_Blog_01/register.jsp')">
<h2>您的输入有误,<span id="time">5</span>秒钟后自动跳转,如果不跳转,请点击下面链接</h2>
<!--<s:fielderror></s:fielderror>-->
<a href="http://localhost:8888/Rss_Blog_01/register.jsp">返回</a>
</body>
</html>
<meta http-equiv="Refresh" content="5;URL=http://localhost:8888/Rss_Blog_01/register.jsp">js都不用写了
<script type="text/javascript">delayURL("http://localhost:8888/Rss_Blog_01/register.jsp");</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Blog注册_非法</title>
<script language="JavaScript" type="text/javascript">
function delayURL(url) {
var delay = document.getElementById("timeer");
var htmldelay = delay.innerHTML;
if(delay > 0) {
delay--;
document.getElementById("timeer").innerHTML = delay;
} else {
window.top.location.href = url;
}
setTimeout("delayURL('" + url + "')", 1000); //delayURL(http://wwer)
}
</script></head><body>
<h2>您的输入有误,<span id="timeer">5</span>秒钟后自动跳转,如果不跳转,请点击下面链接</h2>
<!--<s:fielderror></s:fielderror>-->
<a href="http://localhost:8888/Rss_Blog_01/register.jsp">返回</a>
</body>
</html>
<script type="text/javascript">delayURL("http://localhost:8888/Rss_Blog_01/register.jsp");</script>