| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1130 人关注过本帖
标题:这个为什么会出错阿????
只看楼主 加入收藏
johnson_yang
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2004-9-20
收藏
 问题点数:0 回复次数:9 
这个为什么会出错阿????

<head>

<script language="javascript">

function johnson()

{

a="http://sun-c.nease.net"

timerid=settimeout('window.location.href=a',5000)

}

</script>

</head>

<body onload=johnson()>

我的网站已经更换地址.<br>

<a href="http://sun-c.nease.net">NEW ADD

</a>

<br>5秒自动进入

</body>

搜索更多相关主题的帖子: nease href target johnson 
2004-09-20 15:02
大光
Rank: 1
等 级:新手上路
帖 子:100
专家分:0
注 册:2004-5-25
收藏
得分:0 

timerid=settimeout('window.location.href=a',5000)

应改为:'window.location.href = ' + a

2004-09-20 21:53
johnson_yang
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2004-9-20
收藏
得分:0 
还是不行啊斑竹大哥~~~~
2004-09-21 11:06
perryj
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-10-6
收藏
得分:0 

是setTimeout

2004-10-06 19:25
情圣
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2004-10-6
收藏
得分:0 

偶试了几下

还是不行

我再回去想想啊

顺便说一下楼上的好想也不行

这是经过实践检验的啊

嘿嘿...


在静中寻找一切最美的感觉... /images/upphoto/306.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.glite./images/upphoto/306.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-10-06 21:58
perryj
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-10-6
收藏
得分:0 

<head>

<script language="javascript">

function johnson()

{

a="http://sun-c.nease.net"

timerid=setTimeout('window.location.href=a',5000)

}

</script>

</head>

<body onload=johnson()>

我的网站已经更换地址.<br>

<a href="http://sun-c.nease.net">NEW ADD

</a>

<br>5秒自动进入

</body> 我winxp,ie6检测试了n次。不对?你复制我的试试!

[此贴子已经被作者于2004-10-07 13:22:10编辑过]

2004-10-07 13:20
情圣
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2004-10-6
收藏
得分:0 

不好意思

偶又试了一遍,可以D!!!

可能是昨天晚上太累了,不知道把那给弄错啦!!!

嘿嘿...

那你帮我看看我的代码那里错了吧!!!

在本论坛上发了求助帖,是情圣发的那个啦

先谢啦


在静中寻找一切最美的感觉... /images/upphoto/306.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.glite./images/upphoto/306.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-10-07 17:52
zhzhwe
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2004-9-25
收藏
得分:0 

把这句“timerid=settimeout('window.location.href=a',5000)”的"settimeout"改为“setTimeout”就可以了其它什么都不用改的啊


2004-10-08 21:52
情圣
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2004-10-6
收藏
得分:0 

8楼的,没有看6楼说的吗???

人家都说了你还说,并且还是一样的,汗!!!


在静中寻找一切最美的感觉... /images/upphoto/306.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.glite./images/upphoto/306.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-10-09 10:19
jacky
Rank: 1
等 级:新手上路
帖 子:104
专家分:0
注 册:2004-12-17
收藏
得分:0 

其实不用这么写也行吗

比如

<meta http-equic="refresh" content="5,url">

好象这样也可以达到那种效果啊

2004-12-17 21:34
快速回复:这个为什么会出错阿????
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014686 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved