|
1、可移动的文字
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><STYLE>.drag {CURSOR: hand; POSITION: relative}</STYLE>
<SCRIPT language=JavaScript>var dragapproved=false;var z,x,y;function move(){if(event.button==1&&dragapproved){z.style.pixelLeft=temp1+event.clientX-x;z.style.pixelTop=temp2+event.clientY-y;return false;}};function drags(){if(!document.all) return;if(event.srcElement.className=="drag"){dragapproved=true;z=event.srcElement;temp1=z.style.pixelLeft;temp2=z.style.pixelTop;x=event.clientX;y=event.clientY;document.onmousemove=move}};document.onmousedown=drags;document.onmouseup=new Function("dragapproved=false");</SCRIPT>
<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体"><FONT class=drag style="CURSOR: move" color=#cc0000>将鼠标按在这些字上,然后拖动你的鼠标,试试看会发生什么!</FONT></SPAN></body></html>
2、一个一个变色的文字
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><script>var message="一个个变色的文字,你想不想知道我是怎么弄的呢?";var neonbasecolor='red';var neontextcolor='black';var flashspeed=100;var n=0;
if (document.all){document.write('<font color='+neonbasecolor+'>');for (m=0;m<message.length;m++)document.write('<a href=http://www.netsh.com><span id=neonlight>'+message.charAt(m)+'</span></a>');document.write('</font>');var tempref=document.all.neonlight}else document.write(message);function neon(){if(n==0){for(m=0;m<message.length;m++)tempref[m].style.color=neonbasecolor};tempref[n].style.color=neontextcolor;if(n<tempref.length-1)n++;else{n=0;clearInterval(flashing);setTimeout("beginneon()",1500);return}};function beginneon(){if (document.all)flashing=setInterval("neon()",flashspeed)};beginneon()</script></body></html>
3、彩色打印机效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><DIV class=ttl1 id=ttl0><SPAN class=ttl1></SPAN></DIV>
<SCRIPT language="JavaScript">var layers=document.layers,style=document.all,both=layers || style,idme=908601;if (layers){layerRef='document.layers';styleRef='';};if(style){layerRef='document.all';styleRef='.style';};function writeOnText(obj, str){if(layers)with(document[obj]){document.open();document.write(str);document.close();};if (style)eval(obj+'.innerHTML=str');};var dispStr=new Array("<font color=red size=3>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</font><br><font color=green size=3>呵呵呵呵呵呵呵呵呵呵呵呵呵呵呵呵</font><br><font color=red size=3>嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻</font><br>%3 |
|