标题:网页特效代码集合,菜鸟必看~~~~~~!
只看楼主
Viking
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2004-11-5
得分:0 

禁右键

<script language="javascript"> function click() { if (event.button==2) { alert('小样,偷想看我东西 。') } } document.onmousedown=click </script>

放入<body>区域中


┏━━━ミ━━┓ ┃     |||┃ ┃━━ ﹏ ━━┃ ┗━━━━━━┛ ~洋葱头~~小辫辫~ ~血可流!头可断~! ~偶滴发型不能乱~
2004-11-12 21:51
Viking
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2004-11-5
得分:0 

接着昨天

ie按钮总动员 <OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0>  </OBJECT>  <input onclick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开 name=Button1>  <input onclick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为 name=Button2>  <input onclick=document.all.WebBrowser.ExecWB(10,1) type=button value=属性 name=Button3>  <input onclick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印 name=Button>  <input onclick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置 name=Button4>    <input onclick=window.location.reload() type=button value=刷新 name=refresh>  <input onclick="window.external.ImportExportFavorites(true,'');" type=button value=导入收藏夹 name=Button5>  <input onclick="window.external.ImportExportFavorites(false,'');" type=button value=导出收藏夹 name=Button32>  <input onclick="window.external.AddFavorite(location.href, document.title)" type=button value=加入收藏夹 name=Button22>    <input onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)" type=button value=整理收藏夹 name=Submit2>  <input onclick='window.location="view-source:" + window.location.href' type=button value=查看源文件 name=Button7>  <input onclick="window.external.ShowBrowserUI('LanguageDialog', null)" type=button value=语言设置 name=Button6>  <input onclick=history.go(1) type=submit value=前进 name=Submit>  <input onclick=history.go(-1) type=submit value=后退 name=Submit2>


┏━━━ミ━━┓ ┃     |||┃ ┃━━ ﹏ ━━┃ ┗━━━━━━┛ ~洋葱头~~小辫辫~ ~血可流!头可断~! ~偶滴发型不能乱~
2004-11-13 21:05
Viking
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2004-11-5
得分:0 
radio按钮调
&lt;form&gt;
&lt;div align="center"&gt;&lt;center&gt;&lt;p&gt;本站很好: &lt;input TYPE="radio" NAME="radio" value="谢谢您的鼓励和支持!" onClick="alert(value)"&gt;

本站一般: &lt;input TYPE="radio" NAME="radio" value="我会不断努力的!" onClick="alert(value)"&gt;

本站太差: &lt;input TYPE="radio" NAME="radio" value="具体的意见建议请Email给我,谢谢!" onClick="alert(value)"&gt;
&lt;/p&gt;
&lt;/center&gt;&lt;/div&gt;
&lt;/form&gt;

┏━━━ミ━━┓ ┃     |||┃ ┃━━ ﹏ ━━┃ ┗━━━━━━┛ ~洋葱头~~小辫辫~ ~血可流!头可断~! ~偶滴发型不能乱~
2004-11-13 21:06
Viking
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2004-11-5
得分:0 
变换连接色和底色 <!--脚本说明: 第一步:把如下代码加入<head>区域中--> <SCRIPT LANGUAGE="javascript"> <!-- Begin function doColor(item, color, bg) { item.style.color = color; // changes text color item.style.backgroundColor = bg; // changes background } function undoColor(item) { item.style.color = "#000000"; // sets color back to black item.style.backgroundColor = ""; // sets background to default } // End --> </script> </HEAD> <!--第二步:在<body>区中加入如下代码--> <a name="link1" href="http://lwjrj.yeah.net/" onmouseover="doColor(link1, 'yellow','black');" onmouseout="undoColor(link1);">心梦在线</a> <p> <a name="link2" href="http://www.javascriptsource.com/" onmouseover="doColor(link2, 'blue','red');" onmouseout="undoColor(link2);">闪客帝国</a>

┏━━━ミ━━┓ ┃     |||┃ ┃━━ ﹏ ━━┃ ┗━━━━━━┛ ~洋葱头~~小辫辫~ ~血可流!头可断~! ~偶滴发型不能乱~
2004-11-13 21:07
Viking
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2004-11-5
得分:0 
窗口的打开和关闭
&lt;!--脚本说明:
第一步:把如下代码加入&lt;head&gt;区域中--&gt;
&lt;SCRIPT language="javascript"&gt;
&lt;!--
function openclk() {
another=open('test.htm','NewWindow');
}
function closeclk() {
another.close();
}
//--&gt;
&lt;/SCRIPT&gt;
&lt;!--第二步:把如下代码加入&lt;body&gt;区域中--&gt;

&lt;form&gt;
&lt;INPUT TYPE="BUTTON" NAME="open" value="打开一个窗口" onClick="openclk()"&gt;
&lt;BR&gt;
&lt;INPUT TYPE="BUTTON" NAME="close" value="关闭这个窗口" onClick="closeclk()"&gt;
&lt;/form&gt;


┏━━━ミ━━┓ ┃     |||┃ ┃━━ ﹏ ━━┃ ┗━━━━━━┛ ~洋葱头~~小辫辫~ ~血可流!头可断~! ~偶滴发型不能乱~
2004-11-13 21:09
yl10
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2004-9-30
得分:0 
我辛苦啦,

我是老大,我怕谁。 www. 西联技术人才群:22238869
2004-11-13 22:49
Viking
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2004-11-5
得分:0 

yl10 兄是口wu吧,呵呵,没事,咱兄弟虽然是.NET派的,但仍然来捧你场.


┏━━━ミ━━┓ ┃     |||┃ ┃━━ ﹏ ━━┃ ┗━━━━━━┛ ~洋葱头~~小辫辫~ ~血可流!头可断~! ~偶滴发型不能乱~
2004-11-13 23:09
zswlove
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2004-10-16
得分:0 

好多的特效,斑竹辛苦了


2004-11-14 00:09
zswlove
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2004-10-16
得分:0 

我也来发几个特效

一 、很酷的弹出老人动画

<html> <head> <SCRIPT> <!-- function crml(nid) { try { nid=new ActiveXObject("Agent.Control.2"); nid.Connected = true; nid.Characters.Load(""); return nid; } catch (err) { return false; } } function chplay () { if (ml=crml ("ml")) { var MerlinID; var MerlinACS; Merlin = ml.Characters.Character(MerlinID); Merlin.MoveTo(200,200); Merlin.Show(); Merlin.Play("Explain"); Merlin.Play("Announce"); Merlin.Speak("欢迎你来到free.2259.com电脑频道!"); Merlin.Play("Gestureright"); Merlin.Play("Pleased"); Merlin.Speak("我们的网址:http://free.2259.com";); Merlin.Play("Idle1_1"); Merlin.Hide(); Merlin.MoveTo(600,300); Merlin.Show(); Merlin.Play("Surprised"); Merlin.Speak("2259音乐频道 http://www.2259.com/index.asp";); Merlin.Play("Read"); Merlin.Speak("还多了一个专门的FLASH音乐频道"); Merlin.Play("Read") Merlin.Play("GestureUp"); Merlin.Speak("网址是:Http://flash.2259.com希望大家会喜欢"); Merlin.Play("DontRecognize"); Merlin.Speak("感谢您的到来"); Merlin.Play("DontRecognize"); Merlin.Play("Greet"); Merlin.Speak("提前祝你圣诞快乐!"); Merlin.Play("Greet"); Merlin.Speak("下次再见!"); Merlin.Play("Greet"); Merlin.Hide(); } } //-->   </SCRIPT> <SCRIPT> <!-- chplay() --> </SCRIPT> </head> </html>

[此贴子已经被静夜思于2005-1-4 9:19:08编辑过]


2004-11-14 00:10
zswlove
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2004-10-16
得分:0 
二、结合的很酷的文本滚动与网页飞花的特效 <SCRIPT language=JavaScript> //设置marquee的宽度(in pixels)  var marqueewidth=190 //设置marquee的高度  var marqueeheight=200 //设置marquee的速度  var speed=1 //设置marquee的显示内容  var marqueecontents=  ef="<center><p>加如文章的内容</center>" if (document.all)  document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')  function regenerate(){  window.location.reload()  }  function regenerate2(){  if (document.layers){  setTimeout("window.onresize=regenerate",450)  intializemarquee()  }  }  function intializemarquee(){  document.cmarquee01.document.cmarquee02.document.write(marqueecontents)  document.cmarquee01.document.cmarquee02.document.close()  thelength=document.cmarquee01.document.cmarquee02.document.height  scrollit()  }  function scrollit(){  if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){  document.cmarquee01.document.cmarquee02.top-=speed  setTimeout("scrollit()",100)  }  else{  document.cmarquee01.document.cmarquee02.top=marqueeheight  scrollit()  }  }  window.onload=regenerate2  </SCRIPT> <script language="JavaScript1.2"><!-- Begin var no = 20; // snow number var speed = 10; // smaller number moves the snow faster var snowflake = "images/snow.gif"; var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var dx, xp, yp;  // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i < no; ++ i) {  dx = 0;            // set coordinate variables xp = Math.random()*(doc_width-50); // set position variables yp = Math.random()*doc_height; am = Math.random()*20;     // set amplitude variables stx = 0.02 + Math.random()/10; // set step variables sty = 0.7 + Math.random();   // set step variables if (ns4up) {           // set layers if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\"" + snowflake + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\"" + snowflake + "\" border=\"0\"></layer>");   } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src=\"" + snowflake + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src=\"" + snowflake + "\" border=\"0\"></div>");    }   } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp += sty; if (yp > doc_height-50) { xp = Math.random()*(doc_width-am-30); yp = 0; stx = 0.02 + Math.random()/10; sty = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx += stx; document.layers["dot"+i].top = yp; document.layers["dot"+i].left = xp + am*Math.sin(dx); } setTimeout("snowNS()", speed); } function snowIE() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp += sty; if (yp > doc_height-50) { xp = Math.random()*(doc_width-am-30); yp = 0; stx = 0.02 + Math.random()/10; sty = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx += stx; document.all["dot"+i].style.pixelTop = yp; document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } // End --> </script>

2004-11-14 00:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-7495-1-1.html




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

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