分享
 
 
 

鼠标点击效果

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>

<!-- 把如下代码加入<body>区域中 -->

<!-- http://www.webjx.com/ -->

<!-- http://bbs.webjx.com -->

<!--脚本说明:

第一步:把如下代码加入<head>区域中-->

单击鼠标查看效果

<SCRIPT LANGUAGE="JavaScript1.2">

<!-- Begin

var ver = navigator.appVersion;

var dom = document.getElementById ? 1 : 0;

var ie5 = (ver.indexOf("MSIE 5") > -1 && dom) ? 1 : 0;

var n = (document.layers);

var ie = (document.all);

var sparksAflyin = 0;

var totalSparks = 0;

var sparksOn = 1;

function initMouseEvents() {

document.onmousedown = mouseDown;

if (n) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);

}

function mouseDown(e) {

if (sparksOn) {

var mousex = (n) ? e.pageX : event.x+document.body.scrollLeft;

var mousey = (n) ? e.pageY : event.y+document.body.scrollTop;

if (!sparksAflyin) {

for (var k = 0; k <= 9; k++)

eval('SHOW("sDiv'+k+'")');

sparksAflyin = 1;

totalSparks = 0;

for(i = 0;i <= 9; i++)

eval('moveTo('+i+',0,'+mousex+','+mousey+')');

}

}

}

function moveTo(i,j, mousex, mousey){

if (j < eval('anim_'+i+'_x.length') ){

var tempx = eval('anim_'+i+'_x[j]+mousex');

var tempy = eval('anim_'+i+'_y[j]+mousey');

if (ie) {

if(tempy+30 > (document.body.offsetHeight+document.body.scrollTop))

tempy = document.body.offsetHeight+document.body.scrollTop-30;

if(tempx+30 > (document.body.offsetWidth+document.body.scrollLeft))

tempx = document.body.offsetWidth+document.body.scrollLeft-30;

eval('document.all.sDiv'+i+'.style.left = tempx;');

eval('document.all.sDiv'+i+'.style.top = tempy;');

}

if (n) {

eval('document.layers.sDiv'+i+'.left = tempx;');

eval('document.layers.sDiv'+i+'.top = tempy;');

}

j++;

// timeout: 50 = fireworks speed, larger number = slower speed

setTimeout("moveTo("+i+","+j+","+mousex+","+mousey+")",50)

}

else {

eval('HIDE("sDiv'+i+'")');

totalSparks++;

}

if (totalSparks == 10) {

sparksAflyin = 0;

totalSparks = 0;

}

}

function SHOW(divName){

if (document.all)

eval('document.all.'+divName+'.style.visibility = "visible";');

else if (document.layers)

eval('document.layers["'+divName+'"].visibility = "visible";');

}

function HIDE(divName){

if (document.all)

eval('document.all.'+divName+'.style.visibility = "hidden";');

else if (document.layers)

eval('document.layers["'+divName+'"].visibility = "hide";');

}

anim_0_x=new Array(20,20,10,0,0,0,0,0,0,0,0,0);

anim_0_y=new Array(-20,-40,-60,-80,-60,-40,-20,0,20,40,60,80);

anim_1_x=new Array(20,20,17,36,60,78,90,92,93,98,108,120,133,152,181);

anim_1_y=new Array(-20,-20,-33,-38,-38,-27,-2,25,51,84,113,141,162,212,253);

anim_2_x=new Array(20,20,2,3,4,5,6,7,8,9,10,12,13,15,18);

anim_2_y=new Array(-20,-20,-33,-38,-38,-27,-2,25,51,84,113,141,162,212,253);

anim_3_x=new Array(-20,-20,-2,-1,7,10,18,35,60,102,94,94,93,97,108,111,117,127);

anim_3_y=new Array(-20,-25,-64,-89,-104,-150,-173,-197,-213,-199,-151,-101,-66,-17,27,87,140,189);

anim_4_x=new Array(-20,-20,-10,-39,-30,-69,-64,-138,-154,-200,-181,-209,-191,-207,-203,-213,-202,-221,-211);

anim_4_y=new Array(-20,-20,-28,-51,-79,-100,-135,-154,-193,-183,-149,-134,-89,-60,8,51,107,157,201);

anim_5_x=new Array(-20,-29,-51,-72,-105,-133,-164,-189,-209,-229,-247,-270,-279,-282,-283,-283,-285,-286,-288);

anim_5_y=new Array(-20,-55,-86,-116,-154,-183,-205,-217,-217,-198,-169,-120,-44,-8,40,87,144,190,248);

anim_6_x=new Array(-20,-20,-7,14,44,79,143,186,217,226,234,244,250,259,265,274);

anim_6_y=new Array(-20,-21,-72,-113,-139,-166,-188,-181,-126,-68,-3,54,134,187,215,257);

anim_7_x=new Array(20,20,-3,-9,-13,-27,-33,-44,-54,-66,-77,-95,-107,-136,-150,-160,-164,-168,-171,-172,-172,-176,-175);

anim_7_y=new Array(-20,-26,-43,-63,-89,-116,-145,-169,-201,-222,-240,-253,-254,-245,-220,-195,-160,-124,-81,-53,-26,19,68);

anim_8_x=new Array(-20,20,-35,39,0,45,-1,24,-15,14,-20,35,-18,38,-11,16,49,64,81,93,100,103,109);

anim_8_y=new Array(-20,-20,-32,-42,-62,-76,-89,-107,-132,-147,-173,-180,-192,-209,-236,-193,-119,-73,-24,51,95,130,188);

anim_9_x=new Array(-20,-51,-89,-110,-165,-191,-228,-240,-259,-271,-277,-281,-287);

anim_9_y=new Array(-20,-20,-35,-37,-34,-16,10,47,105,150,189,227,273);

// End -->

</script>

<!--第二步:把<body>改为-->

<body bgcolor="#fef4d9" OnLoad="initMouseEvents()">

<!--第三步:在<body>区域中加入如下代码-->

<div id="sparks">

<div id="sDiv0" style="position:absolute; visibility: hidden;"><font face="arial black" color="red">a</font></div>

<div id="sDiv1" style="position:absolute; visibility: hidden;"><font face="arial black" color="yellow">b</font></div>

<div id="sDiv2" style="position:absolute; visibility: hidden;"><font face="arial black" color="blue">c</font></div>

<div id="sDiv3" style="position:absolute; visibility: hidden;"><font face="arial black" color="red">d</font></div>

<div id="sDiv4" style="position:absolute; visibility: hidden;"><font face="arial black" color="orange">e</font></div>

<div id="sDiv5" style="position:absolute; visibility: hidden;"><font face="arial black" color="white">f</font></div>

<div id="sDiv6" style="position:absolute; visibility: hidden;"><font face="arial black" color="green">g</font></div>

<div id="sDiv7" style="position:absolute; visibility: hidden;"><font face="arial black" color="skyblue">h</font></div>

<div id="sDiv8" style="position:absolute; visibility: hidden;"><font face="arial black" color="yellow">i</font></div>

<div id="sDiv9" style="position:absolute; visibility: hidden;"><font face="arial black" color="white">j</font></div>

</div>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有