注册 登录 找回密码 回收站 在线 帮助 首页 Blog 繁體中文欢迎 访问本论坛

穆穆族论坛 » 拓 眼 电 脑 » [ 电脑网络 ] » 特效代码收集

本主题共有50张帖子, 被点击16496次 查看上一个主题  查看下一个主题  发表新主题  发布新投票  发表回复
特效代码收集

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

任何连接滑过就点击


<script>  
function mClk2() {var source=event.srcElement;if (source.tagName=="A"){source.click();self.focus();}}  
document.write("<div onmouseover=mClk2();>");  
      </script>





欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:52:02
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   21楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

不错的向上滚动广告代码

===========================================

<SCRIPT language=javascript1.2> 
<!-- 
var scrollerwidth=470
var scrollerheight=60
var scrollerbgcolor='#cccccc'
var pausebetweenimages=10000
var waitingtime=20
var slideimages=new Array()
slideimages[0]='<iframe src="http://u6u8.net"; width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[1]='<iframe src="http://u6u8.net"; width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[2]='<iframe src="http://u6u8.net"; width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[3]='<iframe src="http://u6u8.net"; width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[4]='<iframe src="http://u6u8.net"; width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[5]='<iframe src="http://u6u8.net"; width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
if (slideimages.length>1)
i=2
else
i=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",waitingtime)
}
else{
tlayer.top=scrollerheight
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",waitingtime)
}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2)",pausebetweenimages)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",waitingtime)
}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2)",pausebetweenimages)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",waitingtime)
}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}}
function startscroll(){
if (document.all){
move3(first2)
second2.style.top=scrollerheight
}
else if (document.layers){
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+5
document.main.document.second.visibility='show'
}}
window.onload=startscroll
//-->
</SCRIPT>
<ILAYER id=main bgcolor="&amp;{scrollerbgcolor};" 
height="&amp;{scrollerheight};" width="&amp;{scrollerwidth};"><LAYER id=first 
width="&amp;{scrollerwidth};" top="1" left="0">
<SCRIPT language=javascript1.2>
if (document.layers)
document.write(slideimages[0])
</SCRIPT>
</LAYER><LAYER id=second width="&amp;{scrollerwidth};" top="0" left="0" 
visibility="hide">
<SCRIPT language=javascript1.2>
if (document.layers)
document.write(slideimages[1])
</SCRIPT>
</LAYER></ILAYER>
<SCRIPT language=javascript1.2>
<!-- 
if (document.all){
document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">')
document.write(slideimages[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
//-->
</SCRIPT>

==========================================




欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:54:06
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   22楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

在艺龙看到40个

1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键 
<table border oncontextmenu=return(false)><td>no</table> 可用于table 

2. <body onselectstart="return false"> 取消选取、防止复制 

3. onpaste="return false" 不准粘贴 

4. oncopy="return false;" oncut="return false;" 防止复制 

5. <link rel="shortcut icon" href="favicon.ico"> ie地址栏前换成自己的图标 

6. <link rel="bookmark" href="favicon.ico"> 可以在收藏夹中显示出你的图标 

7. <input style="ime-mode:disabled"> 关闭输入法 

8. 永远都会带着框架 
<script language="javascript"><!-- 
if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页 
// --></script> 

9. 防止被人frame 
<script language=javascript><!-- 
if (top.location != self.location)top.location=self.location; 
// --></script> 

10. 网页将不能被另存为 
<noscript><iframe src=*.html></iframe></noscript> 

11. <input type=button value=查看网页源代码 
onclick="window.location = 'view-source:'+ 'http://www.51js.com/&#39;"> 

12.删除时确认 
<a href='javascript:if(confirm("确实要删除吗?"))location="boos.asp?&areyou=删除&page=1"'>删 

除</a> 

13. 取得控件的绝对位置 
//javascript 
<script language="javascript"> 
function getie(e){ 
var t=e.offsettop; 
var l=e.offsetleft; 
while(e=e.offsetparent){ 
t+=e.offsettop; 
l+=e.offsetleft; 

alert("top="+t+"/nleft="+l); 

</script> 

//vbscript 
<script language="vbscript"><!-- 
function getie() 
dim t,l,a,b 
set a=document.all.img1 
t=document.all.img1.offsettop 
l=document.all.img1.offsetleft 
while a.tagname<>"body" 
set a = a.offsetparent 
t=t+a.offsettop 
l=l+a.offsetleft 
wend 
msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置" 
end function 
--></script> 

14. 光标是停在文本框文字的最后 
<script language="javascript"> 
function cc() 

var e = event.srcelement; 
var r =e.createtextrange(); 
r.movestart('character',e.value.length); 
r.collapse(true); 
r.select(); 

</script> 
<input type=text name=text1 value="123" onfocus="cc()"> 

15. 判断上一页的来源 
javascript: 
document.referrer 

16. 最小化、最大化、关闭窗口 
<object id=hh1 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> 
<param name="command" value="minimize"></object> 
<object id=hh2 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> 
<param name="command" value="maximize"></object> 
<object id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> 
<param name="command" value="close"></object> 

<input type=button value=最小化 onclick=hh1.click()> 
<input type=button value=最大化 onclick=hh2.click()> 
<input type=button value=关闭 onclick=hh3.click()> 
本例适用于ie 

17.屏蔽功能键shift,alt,ctrl 
<script> 
function look(){ 
if(event.shiftkey) 
alert("禁止按shift键!"); //可以换成alt ctrl 

document.onkeydown=look; 
</script> 

18. 网页不会被缓存 
<meta http-equiv="pragma" content="no-cache"> 
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> 
<meta http-equiv="expires" content="wed, 26 feb 1997 08:21:57 gmt"> 
或者<meta http-equiv="expires" content="0"> 

19.怎样让表单没有凹凸感? 
<input type=text style="border:1 solid #000000"> 
或 
<input type=text style="border-left:none; border-right:none; border-top:none; border-bottom: 

1 solid #000000"></textarea> 

20.<div><span>&<layer>的区别? 
<div>(division)用来定义大段的页面元素,会产生转行 
<span>用来定义同一行内的元素,跟<div>的唯一区别是不产生转行 
<layer>是ns的标记,ie不支持,相当于<div> 


21.让弹出窗口总是在最上面: 
<body onblur="this.focus();"> 

22.不要滚动条? 
让竖条没有: 
<body style='overflow:scroll;overflow-y:hidden'> 
</body> 
让横条没有: 
<body style='overflow:scroll;overflow-x:hidden'> 
</body> 
两个都去掉?更简单了 
<body scroll="no"> 
</body> 

23.怎样去掉图片链接点击后,图片周围的虚线? 
<a href="#" onfocus="this.blur()"><img src="logo.jpg" border=0></a> 

24.电子邮件处理提交表单 
<form name="form1" method="post" action="mailto:****@***.com" enctype="text/plain"> 
<input type=submit> 
</form> 

25.在打开的子窗口刷新父窗口的代码里如何写? 
window.opener.location.reload() 

26.如何设定打开页面的大小 
<body onload="top.resizeto(300,200);"> 
打开页面的位置<body onload="top.moveby(300,200);"> 

27.在页面中如何加入不是满铺的背景图片,拉动页面时背景图不动 
<style> 
body 
{background-image:url(logo.gif); background-repeat:no-repeat; 

background-position:center;background-attachment: fixed} 
</style> 

28. 检查一段字符串是否全由数字组成 
<script language="javascript"><!-- 
function checknum(str){return str.match(//d/)==null} 
alert(checknum("1232142141")) 
alert(checknum("123214214a1")) 
// --></script> 

29. 获得一个窗口的大小 
document.body.clientwidth; document.body.clientheight 

30. 怎么判断是否是字符 
if (/[^/x00-/xff]/g.test(s)) alert("含有汉字"); 
else alert("全是字符"); 

31.textarea自适应文字行数的多少 
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posheight=this.scrollheight"> 
</textarea> 

32. 日期减去天数等于第二个日期 
<script language=javascript> 
function cc(dd,dadd) 

//可以加上错误处理 
var a = new date(dd) 
a = a.valueof() 
a = a - dadd * 24 * 60 * 60 * 1000 
a = new date(a) 
alert(a.getfullyear() + "年" + (a.getmonth() + 1) + "月" + a.getdate() + "日") 

cc("12/23/2002",2) 
</script> 

33. 选择了哪一个radio 
<html><script language="vbscript"> 
function checkme() 
for each ob in radio1 
if ob.checked then window.alert ob.value 
next 
end function 
</script><body> 
<input name="radio1" type="radio" value="style" checked>style 
<input name="radio1" type="radio" value="barcode">barcode 
<input type="button" value="check" onclick="checkme()"> 
</body></html> 

34.脚本永不出错 
<script language="javascript"> 
<!-- hide 
function killerrors() { 
return true; 

window.onerror = killerrors; 
// --> 
</script> 

35.enter键可以让光标移到下一个输入框 
<input onkeydown="if(event.keycode==13)event.keycode=9"> 

36. 检测某个网站的链接速度: 
把如下代码加入<body>区域中: 
<script language=javascript> 
tim=1 
setinterval("tim++",100) 
b=1 

var autourl=new array() 
autourl[1]="www.njcatv.net" 
autourl[2]="javacool.3322.net" 
autourl[3]="www.sina.com.cn" 
autourl[4]="www.nuaa.edu.cn" 
autourl[5]="www.cctv.com" 

function butt(){ 
document.write("<form name=autof>") 
for(var i=1;i<autourl.length;i++) 
document.write("<input type=text name=txt"+i+" size=10 value=测试中……> =》<input type=text 

name=url"+i+" size=40> =》<input type=button value=go 

onclick=window.open(this.form.url"+i+".value)>
") 
document.write("<input type=submit value=刷新></form>") 

butt() 
function auto(url){ 
document.forms[0]["url"+b].value=url 
if(tim>200) 
{document.forms[0]["txt"+b].value="链接超时"} 
else 
{document.forms[0]["txt"+b].value="时间"+tim/10+"秒"} 
b++ 

function run(){for(var i=1;i<autourl.length;i++)document.write("<img 

src=http://"+autourl+"/"+math.random()+" width=1 height=1 

onerror=auto('http://";;+autourl+"')>")} 
run()</script> 

37. 各种样式的光标 
auto :标准光标 
default :标准箭头 
hand :手形光标 
wait :等待光标 
text :i形光标 
vertical-text :水平i形光标 
no-drop :不可拖动光标 
not-allowed :无效光标 
help :?帮助光标 
all-scroll :三角方向标 
move :移动标 
crosshair :十字标 
e-resize 
n-resize 
nw-resize 
w-resize 
s-resize 
se-resize 
sw-resize 

38.页面进入和退出的特效 
进入页面<meta http-equiv="page-enter" content="revealtrans(duration=x, transition=y)"> 
推出页面<meta http-equiv="page-exit" content="revealtrans(duration=x, transition=y)">  
这个是页面被载入和调出时的一些特效。duration表示特效的持续时间,以秒为单位。transition表示使 

用哪种特效,取值为1-23: 
  0 矩形缩小 
  1 矩形扩大 
  2 圆形缩小 
  3 圆形扩大 
  4 下到上刷新 
  5 上到下刷新 
  6 左到右刷新 
  7 右到左刷新 
  8 竖百叶窗 
  9 横百叶窗 
  10 错位横百叶窗 
  11 错位竖百叶窗 
  12 点扩散 
  13 左右到中间刷新 
  14 中间到左右刷新 
  15 中间到上下 
  16 上下到中间 
  17 右下到左上 
  18 右上到左下 
  19 左上到右下 
  20 左下到右上 
  21 横条 
  22 竖条 
  23 以上22种随机选择一种 

39.在规定时间内跳转 
<meta http-equiv=v="refresh" content="5;url=http://www.51js.com"> 

40.网页是否被检索 
<meta name="robots" content="属性值"> 
  其中属性值有以下一些: 
  属性值为"all": 文件将被检索,且页上链接可被查询; 
  属性值为"none": 文件不被检索,而且不查询页上的链接; 
  属性值为"index": 文件将被检索; 
  属性值为"follow": 查询页上的链接; 
  属性值为"noindex": 文件不检索,但可被查询链接; 
  属性值为"nofollow": 文件不被检索,但可查询页上的链接




欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:54:57
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   23楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

点广告才可以下载的代码

这样写 点了广告就在新页面自动下载了


<table onclick="window.open('下载地址','_blank','width=0,height=0')"><tr><td><广告代码></td></tr></table>





欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:55:30
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   24楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

站长站弹出广告代码

<SCRIPT language=javascript>window.showModelessDialog("http://www.chinaz.com/A-Ddi.htm";,"CHINAZDindexP","center:no;dialogLeft:5px;dialogTop:5px;scroll:0;status:0;help:0;resizable:0;dialogWidth:305px;dialogHeight:325px")</SCRIPT>

Chikoo 2004-11-29 2:56:09



欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:55:55
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   25楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

总在最下的广告代码


<!--用<body onLoad='fix()' onScroll="fix()" onResize="fix()">替换<body> -->
<!--将以下代码加入HTML的<Body></Body>之间-->
<script language="javascript">
<!--
function stat(){
var a = pageYOffset+window.innerHeight-document.bar.document.height-15
document.bar.top = a
setTimeout('stat()',2)
}
function fix(){
nome=navigator.appName
if(nome=='Netscape'){
stat()
}
else{
var a=document.body.scrollTop+document.body.clientHeight-document.all.bar.offsetHeight+15
bar.style.top = a
}}
//-->
</script> 
<span id="bar" style="position:absolute; left:68px; top:455px; width:614px; height:45px; z-index:9" > 
<table align="center" border="1" hspace="1" cellpadding="1" bordercolor="#000000" bgcolor="#FFFFFF">
<tr align="center"> 

<td > <a href="http://remotion.myetang.com";>网页特效梦工厂</a></td>
<td > <a href="http://www.skycn.com";>天空下载</a></td>
</tr></table></span>






欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:56:42
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   26楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

定时更换超级连接的代码

<!--用<body onload="if (document.all||document.layers) {regenerate2();update()}">替换原来的<Body>-->
<!--将以下代码加入HTML的<Body></Body>之间-->

<style>
<!--

#tickertape{
position:relative;

layer-background-color:black;
width:400;
height:12;
; font-family: "宋体"; font-size: 9pt}

#subtickertape{
background-color:black;
position:absolute;
border: 1px solid black;
width:400;
height:12;
; font-family: "宋体"; font-size: 9pt
}


.subtickertapefont{
font:bold 9pt "宋体";
text-decoration:none;
color:white;
}

.subtickertapefont a{
color:white;
text-decoration:none;
; font-family: "宋体"; font-size: 9pt}
-->
</style>
<div id="tickertape"> 
<div id="subtickertape" class="subtickertapefont">初始化...</div>
</div>
<script language="javascript1.2">

var speed=4500

var news=new Array()
news[0]="<a href='http://remotion.myetang.com'>网页特效梦工厂</a>"
news[1]="<a href='http://www.skycn.com'>天空下载</a>"
news[2]="<a href='http://www.delphibbs.com'>大富翁论坛</a>"


i=0
if (document.all)
tickerobject=document.all.subtickertape.style
else
tickerobject=document.tickertape.document
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",450)
}

function update(){
BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10);
if (document.layers){
document.tickertape.document.subtickertape.document.write('<span class="subtickertapefont">'+news[i]+'</span>')
document.tickertape.document.subtickertape.document.close()
}
else 
document.all.subtickertape.innerHTML=news[i]

if (i<news.length-1)
i++
else
i=0
setTimeout("update()",speed)
}

function BgFade(red1, grn1, blu1, red2,
grn2, blu2, steps) {
sred = red1; sgrn = grn1; sblu = blu1; 
ered = red2; egrn = grn2; eblu = blu2; 
inc = steps; 
step = 0; 
RunFader();
}
function RunFader() {
var epct = step/inc; 
var spct = 1 - epct; 
if (document.layers)
tickerobject.bgColor =
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct); 
else
tickerobject.backgroundColor=
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct); 
if ( step < inc ) {
setTimeout('RunFader()',50); 
}
step++;
}

</script>
</tr></table>




欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:57:16
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   27楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

星空背景

<!-- 用<BODY bgColor=#000000 onload=fly()>替换原有的<body> -->
<!--将以下代码加入HTML的<Body></Body>之间-->
<SCRIPT language=javascript>
<!--
SmallStars = 30;
LargeStars = 10;

SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
ns=(document.layers)?1:0;
if (ns){
for (i = 0; i < SmallStars; i++)
{document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>")}
for (i = 0; i < LargeStars; i++)
{document.write("<LAYER NAME='ln"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFFF' CLIP='0,0,2,2'></LAYER>")}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < SmallStars; i++)
{document.write('<div id="si" style="position:absolute;top:0;left:0;width:1px;height:1px;background:#fffff0;font-size:1px"></div>')}
document.write('</div>');
document.write('</div>');
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < LargeStars; i++) 
{document.write('<div id="li" style="position:absolute;top:0;left:0;width:2px;height:2px;background:#ffffff;font-size:2px"></div>')}
document.write('</div>');
document.write('</div>');
}
WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
//Inital placement!
for (i=0; i < SmallStars; i++) 
{                                                                
SmallYpos[i] = Math.round(Math.random()*WinHeight);
SmallXpos[i] = Math.round(Math.random()*WinWidth);
Smallspeed[i]= Math.random()*5+1;
}
for (i=0; i < LargeStars; i++) 
{                                                                
LargeYpos[i] = Math.round(Math.random()*WinHeight);
LargeXpos[i] = Math.round(Math.random()*WinWidth);
Largespeed[i]= Math.random()*10+5;
}
function fly(){
var WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop;
var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft;

for (i=0; i < LargeStars; i++)
{
LargeXpos[i]-=Largespeed[i];
if (LargeXpos[i] < -10)
  {
  LargeXpos[i]=WinWidth;
  LargeYpos[i]=Math.round(Math.random()*WinHeight);
  Largespeed[i]=Math.random()*10+5;
  }
if (ns){
document.layers['ln'+i].left=LargeXpos[i];
document.layers['ln'+i].top=LargeYpos[i]+hscrll;
}
else{
li[i].style.pixelLeft=LargeXpos[i];
li[i].style.pixelTop=LargeYpos[i]+hscrll;
}
}

for (i=0; i < SmallStars; i++)
{
SmallXpos[i]-=Smallspeed[i];
if (SmallXpos[i] < -10)
  {
  SmallXpos[i]=WinWidth;
  SmallYpos[i]=Math.round(Math.random()*WinHeight);
  Smallspeed[i]=Math.random()*5+1;
  }
if (ns){
document.layers['sn'+i].left=SmallXpos[i];
document.layers['sn'+i].top=SmallYpos[i]+hscrll;
}
else{
si[i].style.pixelLeft=SmallXpos[i];
si[i].style.pixelTop=SmallYpos[i]+hscrll;

}
setTimeout('fly()',10);
}
//fly();
//-->
</SCRIPT>




欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:57:37
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   28楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

时间特效。js读取时间

<!--将以下代码加入HTML的<Body></Body>之间-->
<script language="javascript"> 
<!---
today=new Date();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var timevalue = "<FONT COLOR=black>" + ((hours >12) ? hours -12 :hours); timevalue += ((minutes < 10) ? "<BLINK><FONT COLOR=black>:</FONT></BLINK>0" : "<BLINK><FONT COLOR=black>:</FONT></BLINK>") + minutes+"</FONT></FONT>";
timevalue += (hours >= 12) ? "<FONT COLOR=blue><I><B>pm</B></I></FONT>" : "<FONT COLOR=blue><B><I>am</I></B></FONT>";
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i]  }
var d=new initArray("<font color=RED>星期日","<font color=black>星期一","<font color=black>星期二","<font color=black>星期三","<font color=black>星期四","<font color=black>星期五","<font color=red>星期六"); document.write("<font color=black>",today.getYear(),"<font color=black>年","<font color=black>",today.getMonth()+1,"<font color=black>月","<font color=black>",today.getDate(),"<font color=black>日 </FONT>",d[today.getDay()+1]," ",timevalue);  //-->
</script> 




欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:57:55
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   29楼 

Chikoo
 
 
级别:  
天王元老
标识:  
来自:  
地球国 中华人民共和省 河北市 承德村
 
  功能按钮:   查看用户档案   email:***@***.***   http://www.u6u8.net   短消息      以树型方式查看   刷新   加入到私人收藏   修改帖子   删除   引用回复   发表回复   


Re: 特效代码收集

鼠标经过图片加亮显示


<!--将以下代码加入HTML的<Body></Body>之间-->

<SCRIPT language="javascript">
<!--
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=20
}
//-->
</SCRIPT>


<img src="image\flag.gif" 
style="filter:alpha(opacity=20)" 
onMouseOver="makevisible(this,0)" 
onMouseOut="makevisible(this,1)">






欺骗一个人最好的办法就是利用自己的真感情!
 时间:2004/11/29 2:58:15
    注册: 2003-5   发帖: 2850  积分: 3066   状态: offline   30楼 
5:  1  2  3  4  5 

主题管理:  删除  关闭/取消  移动  复制  置顶/取消  精华/取消  刷新统计  编辑主题


快速回复
标题:

内容:
选项: 使用我的个性签名 自动识别URL地址 使用XB代码 使用表情符号
(Ctrl+Enter快速发帖)



用户的言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2001- U6U8.Net Powered by SF v2.0