| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1243 人关注过本帖
标题:把几个javascript代码融合到了一起,为什么不正常呢???
只看楼主 加入收藏
情圣
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2004-10-6
收藏
 问题点数:0 回复次数:3 
把几个javascript代码融合到了一起,为什么不正常呢???

我把从论坛上弄来的几个javascript代码融合到了一起,为什么不能正常运行呢呢???

下面是代码:

<html> <head> <title>我心飞扬</title> <script language="javascript">

function johnson()

{

a="http://free1.e-168.cn/~mzone/bbs/bmb/index.php"

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

}

</script> <SCRIPT FOR=window EVENT=onLoad LANGUAGE=vbscript> image1.filters.item(0).apply() image1.filters.item(0).transition = 12 image1.Style.visibility = "" image1.filters(0).play(2.0) </SCRIPT> </head> <body> <script language="javascript"> weekday() function weekday(){ var x,s1; var d1=new Date(); x=d1.getDay(); switch(x){ case 7: s1="星期天";break; case 1: s1="星期一";break; case 2: s1="星期二";break; case 3: s1="星期三";break; case 4: s1="星期四";break; case 5: s1="星期五";break; case 6: s1="星期六";break; } alert("今天是"+s1+",愿你天天有个好心情,宁飞") } </script><img src="../images1/manhua.jpg" border=5 id="image1" style="visibility:hidden; FILTER:revealTrans(Duration=4.0, Transition=23);" width="189" height="168"> <body onload=johnson()><font size="7">

偶的网站正在建设中ne.</font><br>

<br><a href="http://free1.e-168.cn/~mzone/bbs/bmb/index.php">咱们的论坛</a>

<br><a href="http://www.x-woods.com/service/book/x.aspx?id=88108">偶的留言板</a>

<br><a href="http://mzone.blogone.net">偶的博客</a>

<br>5秒自动进入咱们的论坛 </body> </html>

这些代码可以自动跳入论坛,图片特效,星期提示.但自动跳入的不能正常运行了.

是不是与其他的两个有了什么冲突啊,有优先级什么的...

搜索更多相关主题的帖子: 代码 javascript 
2004-10-09 11:08
情圣
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2004-10-6
收藏
得分:0 

I see!!!

刚才又看了一下,发现图片特效和自动跳入都是事件 onload

控制的,冲突了.但为什么能运行图片特效而不能运行自动跳入呢???


在静中寻找一切最美的感觉... /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 11:15
perryj
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-10-6
收藏
得分:0 

实在没时间,再帮你一次

<html> <head> <title>我心飞扬</title> <script language="javascript">

function johnson()

{

a="http://free1.e-168.cn/~mzone/bbs/bmb/index.php"

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

}

</script> <SCRIPT FOR=window EVENT=onLoad LANGUAGE=vbscript> image1.filters.item(0).apply() image1.filters.item(0).transition = 12 image1.Style.visibility = "" image1.filters(0).play(2.0) </SCRIPT> </head> <body><font size="7"> <script language="javascript"> weekday(); johnson(); function weekday(){ var x,s1; var d1=new Date(); x=d1.getDay(); switch(x){ case 7: s1="星期天";break; case 1: s1="星期一";break; case 2: s1="星期二";break; case 3: s1="星期三";break; case 4: s1="星期四";break; case 5: s1="星期五";break; case 6: s1="星期六";break; } alert("今天是"+s1+",愿你天天有个好心情,宁飞") } </script> <img src="../images1/manhua.jpg" border=5 id="image1" style="visibility:hidden; FILTER:revealTrans(Duration=4.0, Transition=23);" width="189" height="168">

偶的网站正在建设中ne.</font><br>

<br><a href="http://free1.e-168.cn/~mzone/bbs/bmb/index.php">咱们的论坛</a>

<br><a href="http://www.x-woods.com/service/book/x.aspx?id=88108">偶的留言板</a>

<br><a href="http://mzone.blogone.net">偶的博客</a>

<br>5秒自动进入咱们的论坛 </body> </html>

试试,看能不能达到你要的效果!

2004-10-11 20:45
情圣
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-11-11 10:30
快速回复:把几个javascript代码融合到了一起,为什么不正常呢???
数据加载中...
 
   



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

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