游客:
注册
|
登录
|
会员
|
搜索
|
统计
|
帮助
无忧脚本
»
JavaScript & VBScript & DHTML 脚本技术讨论版
» 好久没回51js啦。。。带回来几个原51js的老东西。
‹‹ 上一主题
|
下一主题 ››
40
1/2
1
2
››
投票
交易
悬赏
活动
打印
|
推荐
|
订阅
|
收藏
标题:
[推荐]
好久没回51js啦。。。带回来几个原51js的老东西。
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#1
大
中
小
使用道具
发表于 2007-4-21 12:44
资料
个人空间
主页
短消息
加为好友
好久没回51js啦。。。带回来几个原51js的老东西。
<html> <head> <title>怀念51JS,回家看看。</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF" text="#000000" onLoad="blurtext()"> <SCRIPT language=javaScript> var thissize=11 var textfont="Verdana" var textcolor= new Array() textcolor[0]="EEEEEE" textcolor[1]="DDDDDD" textcolor[2]="CCCCCC" textcolor[3]="AAAAAA" textcolor[4]="888888" textcolor[5]="666666" textcolor[6]="555555" textcolor[7]="444444" textcolor[8]="333333" textcolor[9]="222222" textcolor[10]="111111" textcolor[11]="000000" var message = new Array() message[0]="欢迎访问无忧脚本" message[1]="我们将把最好的东西共享给你" message[2]="这个脚本不错吧?" message[3]="你可以在这里加入不同的东西" message[4]="比如图片,连接等,都可以的" message[5]="如果有什么问题的话,直接回帖就可以了" message[6]="<img src=logo.gif>不要把我们给忘记了" message[7]="我们会尽力来回答你的问题" message[8]="我们的网址是 <img src=/moi/file.gif align=absbottom> <a href=\"http://www.51js.com\" target=_blank>http://www.51js.com</a>" message[9]="如果上网没什么事干的话,可以到我们的聊天区聊聊天南地北的事:)" message[10]="网络正在渐渐的改变我们的生活" message[11]="你会使用论坛吗?有很多贴心的功能,找找看" message[12]="如果在这个版的例子有你喜欢的,记得要放进收藏夹啊!有个收藏夹的图标,点一下就可以了:)" var i_blurstrength=10 var i_message=0 var i_textcolor=0 function blurtext() { if(document.all) { if (i_blurstrength >=-2) { if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1} blurthis.innerHTML="<span id='blurpit1' style='position:absolute;visibility:visible;width:600px;top:5px;left:5px;filter:blur(add=0,strength="+i_blurstrength+",direction=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_message]+"</span>"; document.close() i_blurstrength=i_blurstrength-2 i_textcolor++ var timer=setTimeout("blurtext()",60) } else { if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1} blurthis.innerHTML="<span id='blurit1' style='position:absolute;visibility:visible;width:600px; top:5px;left:5px;filter:blendTrans(duration=4.2);font-family:"+textfont+";font-size:"+thissize+"pt;color:000000'>"+message[i_message]+"</span>"; i_message++ if (i_message>=message.length){i_message=0} i_blurstrength=20 i_textcolor=0 clearTimeout(timer) var timer=setTimeout("blurtext()",1000) } } } // - End of JavaScript - --> </SCRIPT> <DIV id="blurthis" style="position:absolute;visibility:visible;"> </DIV> </body> </html>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#2
大
中
小
使用道具
发表于 2007-4-21 12:45
资料
个人空间
主页
短消息
加为好友
<html> <head> <title>::你会做,我也要会::</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="JavaScript"> <!-- <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y); var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;} if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;} var xx=(parseInt(d.left))?parseInt(d.left):0; var yy=(parseInt(d.top))?parseInt(d.top):0; if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;} else if (c==2) {m=false;clearTimeout(g.p7Magic);} else {var i=parseInt(a); if (eval(g.moved)){clearTimeout(g.p7Magic);} if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}} if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}} if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}} if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}} if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){ xx+="px";yy+="px";} d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')'); }else {g.moved=false;} } //--> </script> <style type="text/css"> <!-- .t { filter: Alpha(Opacity=50)} td { font-size: 12px; line-height: 22px} a:link { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} a:visited { color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} a:hover { background-color: #FF66FF; height: 20px; width: 61px; border: #FFFFFF; border-style: dotted; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} --> </style> </head> <body bgcolor="#FFFFFF" text="#000000"> <div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1"> <div id="Layer2" style="position:absolute; left:264px; top:59px; width:67px; height:52px; z-index:2; background-color: #0068FF; layer-background-color: #0068FF; border: 1px none #000000; visibility: visible" class="t"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td align="center" valign="top"><font color="#FFFFFF" onMouseOver="P7AniMagic('Layer2',210,35,5,30,0,0)" onMouseOut="P7AniMagic('Layer2',264,59,5,30,0,0)">on 1<br> <a href="#;">第一项</a><br> <a href="#;">第二项</a><br> <a href="#;">第三项</a><br> </font></td> </tr> </table> </div> <div id="Layer3" style="position:absolute; left:264px; top:81px; width:66px; height:84px; z-index:3; background-color: #0066FF; layer-background-color: #0066FF; border: 1px none #000000; visibility: visible" class="t"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"><font color="#FFFFFF" onMouseOver="P7AniMagic('Layer3',210,55,5,30,0,0)" onMouseOut="P7AniMagic('Layer3',264,81,5,30,0,0)">on 2<br> <a href="#;">第一项</a><br> <a href="#;">第二项</a><br> <a href="#;">第三项</a><br> </font></div> </td> </tr> </table> </div> <div id="Layer4" style="position:absolute; width:68px; height:80px; z-index:4; left: 264px; top: 102px; background-color: #0064FF; layer-background-color: #0064FF; border: 1px none #000000; visibility: visible" class="t"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"><font color="#FFFFFF" onMouseOver="P7AniMagic('Layer4',210,75,5,30,0,0)" onMouseOut="P7AniMagic('Layer4',264,102,5,30,0,0)">on 3<br> <a href="#;">第一项</a><br> <a href="#;">第二项</a><br> <a href="#;">第三项</a><br> </font></div> </td> </tr> </table> </div> <div id="Layer5" style="position:absolute; width:65px; height:127px; z-index:5; left: 265px; top: 56px"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="72"> <tr> <td height="24" onMouseOver="P7AniMagic('Layer2',210,35,5,30,0,0)" onMouseOut="P7AniMagic('Layer2',264,59,5,30,0,0)"> </td> </tr> <tr> <td height="24" onMouseOver="P7AniMagic('Layer3',210,55,5,30,0,0)" onMouseOut="P7AniMagic('Layer3',264,81,5,30,0,0)"> </td> </tr> <tr> <td height="24" onMouseOver="P7AniMagic('Layer4',210,75,5,30,0,0)" onMouseOut="P7AniMagic('Layer4',264,102,5,30,0,0)"> </td> </tr> </table> </div> </div> </body> </html>
提示:您可以先修改部分代码再运行
效果
霸王龙
我是菜菜菜菜菜...鸟
UID 17850
精华
1
积分 2164
帖子 1182
威望 1161
阅读权限 70
注册 2004-10-6
来自 福建、福州<=>厦门
状态 离线
#3
大
中
小
使用道具
发表于 2007-4-21 12:46
资料
个人空间
短消息
加为好友
8臭...
真是郁闷啊...
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#4
大
中
小
使用道具
发表于 2007-4-21 12:48
资料
个人空间
主页
短消息
加为好友
很早以前的,还没有DW的时候,我们就会搞灰度连接了。
<html> <head> <title>无标题文档</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style> <!-- a.xx:link { filter: Gray; width=1px} a.xx:visited { filter: Gray; width=1px} a.xx:hover { filter: Chroma(Color=#)} --> </style> </head> <body bgcolor="#FFFFFF" text="#000000"> <a href="#;" class="xx"><img src="http://bbs.51js.com/images/51js.gif" width="468" height="60" border="0"></a> </body> </html>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#5
大
中
小
使用道具
发表于 2007-4-21 12:50
资料
个人空间
主页
短消息
加为好友
有人想出了绝对地址
以下是一些很有用的按钮
网上邻居
我的电脑
我的文档
回收站
控制面板
再贴一些绝对地址供大家参考,98、2K、XP下面可能会有不同
拨号网络.{992CFFA0-F557-101A-88EC-00DD010CCC48}
打印机.{2227A280-3AEA-1069-A2DE-08002B30309D}
历史记录.{FF393560-C2A7-11CF-BFF4-444553540000}
回收站.{645FF040-5081-101B-9F08-00AA002F954E}
我的文档.{450D8FBA-AD25-11D0-98A8-0800361B1103}
我的电脑.{20D04FE0-3AEA-1069-A2D8-08002B30309D}
网上邻居.{208D2C60-3AEA-1069-A2D7-08002B30309D}
计划任务.{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#6
大
中
小
使用道具
发表于 2007-4-21 12:52
资料
个人空间
主页
短消息
加为好友
马上有人搞出了模糊。。
<html> <head> <title>见过没?</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style> <!-- a.xx:link { filter: Blur(Add=50, Direction=50, Strength=50); width=1px} a.xx:visited { filter: Blur(Add=50, Direction=50, Strength=50); width=1px} a.xx:hover { filter: Chroma(Color=#)} --> </style> </head> <body bgcolor="#FFFFFF" text="#000000"> <a href="#;" class="xx"><img src="http://bbs.51js.com/images/51js.gif" width="468" height="60" border="0"></a> </body> </html>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#7
大
中
小
使用道具
发表于 2007-4-21 12:53
资料
个人空间
主页
短消息
加为好友
巨大滴广告。。我们也是第一时间会的。
<html> <head> <title>广告演示</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <script> function moveLayer(){ if(advLayer.style.pixelTop>-parseInt(advLayer.clientHeight)) { advLayer.style.pixelTop-=2; setTimeout("moveLayer()",1); } else {advLayer.style.display="none"} } function advout(){ setTimeout("moveLayer()",1000);//一秒种后开始移动 } </script> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="advout()"> <div id="advLayer" style="position:absolute; left:0; top:0; width:100%; height:100%; z-index:1; background-color: #999900; layer-background-color: #999900; border: 1px none #000000"> <!-- 这里插入广告内容 --> <div align="center"><img src="Winxp1.jpg" width="600" height="450"></div> </div> <table width="100%" border="0" cellspacing="2" cellpadding="1" height="100%"> <tr> <td> <table width="500" border="0" cellspacing="2" cellpadding="2" align="center"> <tr> <td bgcolor="#999900"> </td> </tr> <tr> <td bgcolor="#003399" height="143"> <div align="center"><font color="#FFFFFF"><b>页面</b></font> </div> </td> </tr> <tr> <td bgcolor="#FF9900"> </td> </tr> </table> </td> </tr> </table> </body> </html>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#8
大
中
小
使用道具
发表于 2007-4-21 12:54
资料
个人空间
主页
短消息
加为好友
小东西我们也搞。。搞到这种有七没八的东西都出来了
滚动条跑左边去了
<body dir=rtl><p align=left>hehe</p>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#9
大
中
小
使用道具
发表于 2007-4-21 12:55
资料
个人空间
主页
短消息
加为好友
我们整天搞这个搞那个。
<html> <head> <title>渐隐渐现文本公告板</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF" text="#000000"> <script language="JavaScript1.2"> var delay=3000 //set delay between message change (in miliseconds) var fcontent=new Array() begintag='<font face="Arial" size=2>' //set opening tag, such as font declarations fcontent[0]="<b>Scriptkit.com</b><br><br>欢迎您光临,感谢您提出宝贵意见<br><br>有意见和问题请在论坛中提出" fcontent[1]="<b>Scriptkit.com</b><br><br> 特效代码为网站设计师和网页爱好者提供专业的特效代码" fcontent[2]="<b>Scriptkit.com</b><br><br> 相关下载栏目提供全面的Dreamweaver插件下载,让您的DW功能更强大!" closetag='</font>' var fwidth=150 //set scroller width var fheight=150 //set scroller height ///No need to edit below this line///////////////// var ie4=document.all&&!document.getElementById var ns4=document.layers var DOM2=document.getElementById var faderdelay=0 var index=0 if (DOM2) faderdelay=2000 //function to change content function changecontent(){ if (index>=fcontent.length) index=0 if (DOM2){ document.getElementById("fscroller").style.color="rgb(255,255,255)" document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag colorfade() } else if (ie4) document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag else if (ns4){ document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag) document.fscrollerns.document.fscrollerns_sub.document.close() } index++ setTimeout("changecontent()",delay+faderdelay) } // colorfade() partially by Marcio Galli for Netscape Communications. //////////// // Modified by Dynamicdrive.com frame=20; hex=255 // Initial color value. function colorfade() { // 20 frames fading process if(frame>0) { hex-=12; // increase color value document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value. frame--; setTimeout("colorfade()",20); } else{ document.getElementById("fscroller").style.color="rgb(0,0,0)"; frame=20; hex=255 } } if (ie4||DOM2) document.write('<div id="fscroller" style="border:1px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>') window.onload=changecontent </script> <ilayer id="fscrollerns" width=&{fwidth}; height=&{fheight};><layer id="fscrollerns_sub" width=&{fwidth}; height=&{fheight}; left=0 top=0></layer></ilayer> </body> </html>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#10
大
中
小
使用道具
发表于 2007-4-21 12:57
资料
个人空间
主页
短消息
加为好友
一天到晚做些没用的小玩意。。。
<script> function oMove() { var x=event.x; var y=event.y; if (y>0&&y<300) {obj.style.top =y;} if (x>200&&x<500) {obj1.style.left =x; } } </script> <body onmousemove="oMove()"> <div id="obj" style="position:absolute;left:200;top:200">移动的字!</div> <div id="obj1" style="position:absolute;left:200;top:0">移动的字!</div>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#11
大
中
小
使用道具
发表于 2007-4-21 13:01
资料
个人空间
主页
短消息
加为好友
做好事从不留名。。。。以下这段谁写的我都记不得了。
<SCRIPT language=JavaScript1.2> var scrollerwidth=200 var scrollerheight=133 var scrollerbgcolor='white' //3000 miliseconds=3 seconds var pausebetweenimages=3000 var slideimages=new Array() slideimages[0]='<img src="http://bbs.51js.com/images/51js.gif">' slideimages[1]='<img src="http://bbs.51js.com/images/default/logo.gif">' slideimages[2]='<img src="http://bbs.51js.com/images/default/newtopic.gif">' slideimages[3]='<img src="http://bbs.51js.com/images/default/logo.gif">' slideimages[4]='<img src="http://bbs.51js.com/images/default/reply.gif">' slideimages[5]='<img src="052.gif">' slideimages[6]='<img src="074.gif">' slideimages[7]='<img src="053.gif">' slideimages[8]='<img src="054.gif">' slideimages[9]='<img src="055.gif">' slideimages[10]='<img src="056.gif">' slideimages[11]='<img src="073.gif">' //extend this list ///////Do not edit pass this line/////////////////////// 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)",100) } 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)",100) } 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)",100) } 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)",100) } 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){ document.main.visibility='show' move1(document.main.document.first) document.main.document.second.top=scrollerheight+5 document.main.document.second.visibility='show' } } window.onload=startscroll </SCRIPT> <SCRIPT language=JavaScript1.2> if (document.all){ document.writeln('<center><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>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#12
大
中
小
使用道具
发表于 2007-4-21 13:04
资料
个人空间
主页
短消息
加为好友
<html> <head> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>用户ID</title> <style> <!-- td { font-size: 9pt } --> </style> <script language="javascript"> <!-- var row_index=0; //建立一个函数build_row()用于建立新的一行且增加的四个文本框为空的且被禁用 function build_row(){ row_index++; var new_row=Table1.insertRow(Table1.rows.length); new_row.setAttribute("id", "row"+row_index); var new_col=new_row.insertCell(0); new_col.innerHTML="<input type='text' name='T1"+row_index+"' size='20' disabled>"; var new_col=new_row.insertCell(1); new_col.innerHTML="<input type='text' name='T2"+row_index+"' size='20' disabled>"; var new_col=new_row.insertCell(2); new_col.innerHTML="<input type='text' name='T3"+row_index+"' size='8' disabled>"; var new_col=new_row.insertCell(3); new_col.innerHTML="<input type='text' name='T4"+row_index+"' size='8' disabled>"; var new_col=new_row.insertCell(4); new_col.innerHTML="<input type='button' value='添加' name='B5"+row_index+"' LANGUAGE='javascript' onclick='add_data("+row_index+")'>"; var new_col=new_row.insertCell(5); new_col.innerHTML="<input type='button' value='删除此行' name='B4"+row_index+"' LANGUAGE='javascript' onclick=\"delete_row('row"+row_index+ "')\">"; } //建立一个函数age_average()用于计算年龄的平均值 function age_average() { var i,j,temp,age_sum=0;var j=0; for (i=1;i<=Table1.rows.length-1;i++) { temp=eval("form1.T4"+Table1.rows(i).id.substr(3)); if (temp.value==""){ j++; age_sum=age_sum; } else{ age_sum+=parseInt(temp.value); } } form1.T5.value=(age_sum/(Table1.rows.length-1-j)); } //建立一个函数add_data()用于添加数据 function add_data(rname){ var i; form1.hidden_index.value=Table1.rows(rname).rowIndex; var win_new=open("list.htm") } //建立一个函数delete_row用于删除一行 function delete_row(rname) { var i; i=Table1.rows(rname).rowIndex; alert(i); Table1.deleteRow(i); } //建立一个函数check_form()用于检查文本框是否为空 function check_form(){ var i; for(i=1;i<=Table1.rows.length-1;i++){ if (eval("form1.T1"+Table1.rows(i).id.substr(3)).value=="" || eval("form1.T2"+Table1.rows(i).id.substr(3)).value=="" || eval("form1.T3"+Table1.rows(i).id.substr(3)).value=="" || eval("form1.T4"+Table1.rows(i).id.substr(3)).value==""){ alert("请检察是否有文本框为空"); return false; } } } //--> </script> </head> <body> <form id=form1 method="POST" action="submit.htm" language="javascript" onsubmit="return check_form()" > <input type="hidden" name="hidden_index" value=""> <table border="1" width="58%" bordercolor="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="16" id=Table1> <tr> <td width="15%" align="center" bgcolor="#E6E6E6" height="16">用户ID </td> <td width="24%" align="center" bgcolor="#E6E6E6" height="16">用户名</td> <td width="7%" align="center" bgcolor="#E6E6E6" height="16">性别</td> <td width="8%" align="center" bgcolor="#E6E6E6" height="16">年龄</td> <td width="34%" align="center" bgcolor="#E6E6E6" height="16">添加</td> <td width="21%" align="center" bgcolor="#E6E6E6" height="16">删除</td> </tr> </table> <p><input type="button" value="增加一行" name="B3" onclick="build_row()"><input type="submit" value="提交" name="B1"><input type="button" value="平均年龄" name="B6" onClick="age_average()"><input type="text" name="T5" size="7">岁</p> </form> <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="54"> <tr> <td width="100%" bgcolor="#E6E6E6" height="27"> <p align="center">设计要求</td> </tr> <tr> <td width="100%" height="93">1.当用户点击"增加一行",Table就增加一个Tr(包括四个文本框,"添加","删除此行"两个按钮。)。<br> ł.增加的四个文本框为空的且被禁用,用户只要点击"添加"按钮来选择用户的值。<br> Ń.当用户点击"添加"按钮,就弹出新窗口,新窗口为一用户列表,用户列表只有"用户ID"和"用户名"两个字段显示.<br> ń.当选择用户列表Onmouseover时,鼠标变成"hand",当前行的TR的bgcolor为蓝色,字为白色。当用户onclick时,相应的值就添加到四个文本框中。新窗口自动关闭。<br> Ņ.当用户点击"删除此行"按钮时,整个相应的Tr就被删除。<br> ņ.算出"平均年龄"<br> Ň.在提交前,要判断是否有文本框为空,用空的就不能提交,提示用户进行添加。</td> </tr> <tr> <td width="100%" height="23" bgcolor="#E6E6E6">难度:较难????????? 完成时间:半天</td> </tr> </table> </body> </html>
提示:您可以先修改部分代码再运行
有人想就有人做。。我们就是51js人
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#13
大
中
小
使用道具
发表于 2007-4-21 13:07
资料
个人空间
主页
短消息
加为好友
看看某人小时候的作品。。 嘻嘻 嘻。。。。。。
菜单很好。 <!-- 本页由flashsoft2000完成 --> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style> body,td,a {font-size:9pt;color:black;text-decoration:none} .normal {padding:2px} .up {padding:1px;border:#999999 1px solid;background:#cccccc} .down {padding:1px;border:dbdbdb 1px solid;background:dbdbdb} .menuv {filter: revealTrans(transition=23,duration=0.5);position: absolute; visibility: hidden; padding:2px} </style> <body onmousemove="move()"> <script> //闪烁的表格边框 function flashit(){if(!document.all)return;if (td123.style.borderColor=="black")td123.style.borderColor="#999999";else td123.style.borderColor="black"}setInterval("flashit()",500) //渐入的效果,改变alpha值 function high(image){theobject=image,highlighting=setInterval("highlightit(theobject)",100)}function low(image){clearInterval(highlighting),image.filters.alpha.opacity=50}function highlightit(cur2){if (cur2.filters.alpha.opacity<100)cur2.filters.alpha.opacity+=20;else if(window.highlighting)clearInterval (highlighting)} //拖动层的js var over=false,down=false,divleft,divtop;function move(){if(down){plane.style.left=event.clientX-divleft;plane.style.top=event.clientY-divtop;}} </script> <script language="javaScript"> <!-- function Show(divid) { divid.filters.revealTrans.apply(); divid.style.visibility = "visible"; divid.filters.revealTrans.play(); } function Hide(divid) { divid.filters.revealTrans.apply(); divid.style.visibility = "hidden"; divid.filters.revealTrans.play(); } //--> </script> <div style="position:absolute;z-index:1;width:1;height:1; left: 100; top: 100" ID=plane onmousedown="down=true;divleft=event.clientX-parseInt(plane.style.left);divtop=event.clientY-parseInt(plane.style.top)" onmouseup="down=false"> <table id="td123" cellspacing=2 width=100 border=0 style="BORDER:#999999 1px solid;cursor:hand" cellpadding="0" bgcolor="f4f4f4"> <tr> <td bgcolor="#cccccc" height="20" style="BORDER:#999999 1px solid;cursor:move"> <div align="center">无聊的菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this),Show(menu1) " onMouseOut="this.className='normal',low(this),menu1.style.visibility='hidden'" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'" > <div align="right">有下级菜单>></div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this),Show(menu2)" onMouseOut="this.className='normal',low(this),menu2.style.visibility='hidden'" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'" > <div align="right">有下级菜单>></div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align="right">无下级菜单>></div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align="right">无下级菜单>></div> </td> </tr> </table> <div id="menu1" style="position:absolute;top:24px;left:96px; z-index:1; visibility: hidden; width: 105" onMouseOver=this.style.visibility='visible' onMouseOut=this.style.visibility='hidden' class="menuv"> <table cellspacing=2 width=100 border=0 style="BORDER:#999999 1px solid;cursor:hand" cellpadding="0" bgcolor="f4f4f4" align="right"> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align="center">子菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align=center>子菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align=center>子菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align=center>子菜单</div> </td> </tr> </table> </div> <div id="menu2" style="position:absolute;top:45px;left:96; z-index:1; visibility: hidden; width: 105" onMouseOver=this.style.visibility='visible' onMouseOut=this.style.visibility='hidden' class="menuv"> <table cellspacing=2 width=100 border=0 style="BORDER:#999999 1px solid;cursor:hand" cellpadding="0" bgcolor="f4f4f4" align="right"> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align="center">子菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align=center>子菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align=center>子菜单</div> </td> </tr> <tr> <td class=normal onMouseDown="this.className='down'" onMouseOver="this.className='up',high(this)" onMouseOut="this.className='normal',low(this)" style="filter:alpha(opacity=50)"onMouseUp="this.className='up'"> <div align=center>子菜单</div> </td> </tr> </table> </div> </div>
提示:您可以先修改部分代码再运行
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#14
大
中
小
使用道具
发表于 2007-4-21 13:09
资料
个人空间
主页
短消息
加为好友
有没有老不死的记得我哟。。。。
霜城
爬虫
UID 262
精华 0
积分 87
帖子 36
威望 66
阅读权限 20
注册 2003-2-13
来自 晶体星河
状态 离线
#15
大
中
小
使用道具
发表于 2007-4-21 13:14
资料
个人空间
主页
短消息
加为好友
或许现在很多人有先进的工具软件。。这些已经不再是难事。
但是,你可以从这些旧东西里,发现51JS人的创造精神。
可爱的创新。。JS 需要的不是按步就搬,而是创新。
zhouqing
爬虫
UID 68562
精华 0
积分 75
帖子 33
威望 33
阅读权限 20
注册 2007-4-20
状态 离线
#16
大
中
小
使用道具
发表于 2007-4-21 14:09
资料
个人空间
短消息
加为好友
不错
是个高手,斑竹您能帮我解决下我的问题吗?
我用的jsp+servlert 在文本框里输入的内容到达最右侧以后,文本内容就会自动回行
而我在存入数据库显示的时候想要得到和录入的形式完全符合的内容,没有办法获得。
即我只能找到硬回车而无法识别内容满以后自动回行的内容。
我现在想有没有一种方法可以从文本域中获得一行一行的读取内容,类似于读文本文件的readline
哪位高手能帮我下,给点建议
逍遥云
超级版主
振兴无忧
UID 11191
精华
9
积分 2383
帖子 1354
威望 1321
阅读权限 150
注册 2004-5-6
状态 离线
#17
大
中
小
使用道具
发表于 2007-4-21 14:14
资料
个人空间
短消息
加为好友
在效果充拆的年代,真是怀念了。我记得那时我最喜欢写的也就是js的鼠标跟随了:)
那是2003年,我大二,刚从学校的西区搬到东区。在网吧里留下很多我写js代码的例子,继而幼稚,继而疯狂
[[i] 本帖最后由 逍遥云 于 2007-4-21 14:16 编辑 [/i]]
flash参考帖汇总
给无忧的朋友们
zhouqing
爬虫
UID 68562
精华 0
积分 75
帖子 33
威望 33
阅读权限 20
注册 2007-4-20
状态 离线
#18
大
中
小
使用道具
发表于 2007-4-21 14:16
资料
个人空间
短消息
加为好友
大家有谁解决过这个问题吗 帮帮小弟 谢谢了
tingwei
小恐龙
UID 67035
精华 0
积分 257
帖子 135
威望 142
阅读权限 30
注册 2007-3-27
状态 离线
#19
大
中
小
使用道具
发表于 2007-4-21 14:19
资料
个人空间
短消息
加为好友
JS 需要的不是按步就搬,而是创新。
zhouqing
爬虫
UID 68562
精华 0
积分 75
帖子 33
威望 33
阅读权限 20
注册 2007-4-20
状态 离线
#20
大
中
小
使用道具
发表于 2007-4-21 14:25
资料
个人空间
短消息
加为好友
我已经苦恼好多天了 我也想创新啊 没法实现啊
40
1/2
1
2
››
投票
交易
悬赏
活动
无忧脚本
无忧脚本技术讨论区
> 原创文章 & 讨论汇总版
> Html & XHtml & CSS 网页制作讨论版
> JavaScript & VBScript & DHTML 脚本技术讨论版
> XML & XSL & XPath & VML 网页技术讨论版
> ASP & Access & SQL Server 后台编程讨论版
> PHP & MySQL 后台编程讨论版
> JSP & Java & J2SE 后台编程讨论版
> .Net 相关技术讨论版
> Web 服务器技术
> Flex & Flash 技术讨论版
> Web UI & 图形技术讨论版
无忧脚本资源服务区
> 经典代码、教程资源库
> 参考手册、常用软件资源库
> 无忧合租服务器讨论版
无忧脚本休闲区
> 休闲留言板
> 招聘求职、网站推荐、广告信息版
> 无忧站务管理版
> 垃圾帖回收站
控制面板首页
编辑个人资料
积分交易
公众用户组
好友列表
升级个人空间
基本概况
流量统计
客户软件
发帖量记录
论坛排行
主题排行
发帖排行
积分排行
在线时间
管理团队
当前时区 GMT+8, 现在时间是 2008-11-22 03:40
苏ICP备05080427号
Powered by
Discuz!
5.5.0
© 2001-2007
51JS.COM
Processed in 0.177899 second(s), 6 queries , Gzip enabled
TOP
清除 Cookies
-
联系我们
-
无忧脚本
-
Archiver
-
WAP