设为首页收藏本站订阅更新

无忧脚本

 找回密码
 加入无忧

QQ登录

只需一步,快速开始

搜索
楼主: 卫星星

[无忧经典旧帖] == 众多高手的心血集合

[复制链接]
 楼主| 发表于 2003-3-15 21:50:38 | 显示全部楼层
测试指定页面是否存在


  1. <html>
  2. <head>
  3. <title>本程序用于测试指定页面是否存在</title>
  4. <script language=javascript>
  5. function translateHttpHeader(header) {
  6. var meaning = "没有关于HTTP 标头:http-"+header + "  的中文信息"
  7. switch(header) {
  8. case 400: meaning = "请求无效" ;break;
  9. case 401: meaning = "要求密码";break ;
  10. case 401.1: meaning = "无权查看网页,未授权:登录失败" ;break;
  11. case 403: meaning = "拒绝访问" ;break;
  12. case 403.7: meaning = "要求客户证书" ;break;
  13. case 404: meaning = "文件没找到" ;break;
  14. case 405: meaning = "禁止访问资源";break;
  15. case 406: meaning = "无法显示资源,无法接受";break;
  16. case 407: meaning = "要求代理身份验证";break;
  17. case 410: meaning = "网页不存在,永久不可用";break;
  18. case 412: meaning = "先决条件失败" ;break;
  19. case 414: meaning = "请求无效,URI 太长" ;break;
  20. case 500: meaning = "内部服务器错误" ;break;
  21. case 500.11: meaning = "网站关闭" ;break;
  22. case 500.12: meaning = "应用程序重新启动" ;break;
  23. case 500.13: meaning = "服务器太忙" ;break;
  24. }
  25. return meaning
  26. }

  27. function postRequest(postTo,Method) {
  28. //尝试用XMLHTTP测试服务器。

  29. try {
  30. var xhttp= new ActiveXObject("Microsoft.XMLHTTP")
  31.   }
  32. catch (e) {
  33. longinfo.innerHTML="无法创建对象Microsoft.XMLHTTP"
  34. }
  35. try {
  36. xhttp.open(Method,postTo,false,"myschool.net","myschool.net")
  37. xhttp.send()
  38.   if (xhttp.status!=200) {
  39. meaning = translateHttpHeader(xhttp.status);
  40.   hideFrame.document.clear();
  41. hideFrame.document.write(xhttp.responseText)
  42. longinfo.innerHTML="在测试服务器时<br>服务器送回以下HTTP标头!<br>"
  43. longinfo.innerHTML+="<br><font color=red>HTTP "+xhttp.status+"  "+xhttp.statusText+"</font> "
  44. longinfo.innerHTML+="<font color=red><br>"+meaning+"</font> "
  45. longinfo.innerHTML+="<br><br>此头表示当前请求的页面"+postTo+"可能有问题"

  46. xhttp=null
  47. window.status="错误"
  48. return false;
  49. }
  50. else {
  51. longinfo.innerHTML="指定的页面存在而且工作正常."
  52.    }

  53. }
  54. catch (e) {
  55. longinfo.innerHTML="无法连接到指定的服务器:"+postTo+",或发生DNS错误"
  56. longinfo.innerHTML+="<br>"+e.message+"<br><br>请确认您的网络连接。"
  57. xhttp=null
  58. window.status="错误"
  59. return false;
  60. }
  61. window.status = "完毕"
  62. }

  63. function go() {
  64. postTo = URL.value;
  65. Method = sendMethod.value;
  66. postTo.replace("\\","/")
  67. if (postTo.indexOf("http://")==-1) {postTo = "http://"+postTo}
  68. if (postTo.length >225) {longinfo.innerHTML = "URL过长,可能会造成错误。";URL.value="";return false}
  69. window.status="正在使用"+Method+"方法测试:" + postTo +"   稍等..."
  70. postRequest(postTo,Method)
  71. }

  72. </script>
  73. </head>

  74. <body>
  75. 请输入测试信息:<br>
  76. URL:http://<input type=text id=URL size=100><br>
  77. 方法:<select id=sendMethod><option value="GET">GET</option><option value="POST">POST</option></select><Br>
  78. <input type=button onclick=go() value=开始测试><hr>
  79. <div id=longinfo>请输入需要测试的地址。</div>

  80. <iframe id=hideFrame style="display:none"></iframe>
  81. </body>
  82. </html>

复制代码
 楼主| 发表于 2003-3-15 21:51:10 | 显示全部楼层
YBB代码编辑器

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML><HEAD><TITLE>YBB代码编辑器</TITLE>
  3. <META content="text/html; charset=gb2312" http-equiv=Content-Type>
  4. <STYLE type=text/css>A:link {
  5.         TEXT-DECORATION: none
  6. }
  7. A:visited {
  8.         TEXT-DECORATION: none
  9. }
  10. A:hover {
  11.         TEXT-DECORATION: underline
  12. }
  13. A:link {
  14.        
  15. }
  16. A:hover {
  17.         COLOR: red
  18. }
  19. .c {
  20.         FONT: 9pt/12pt 宋体; TEXT-DECORATION: none
  21. }
  22. .d {
  23.         FONT: 13.5pt/15.5pt 宋体; TEXT-DECORATION: none
  24. }
  25. BODY {
  26.         FONT-FAMILY: 宋体; FONT-SIZE: 9pt
  27. }
  28. TABLE {
  29.         FONT-FAMILY: 宋体; FONT-SIZE: 9pt
  30. }
  31. TextBox {
  32.         BACKGROUND-COLOR: #f7f7f7; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
  33. }
  34. PasswordBox {
  35.         BACKGROUND-COLOR: #f7f7f7; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
  36. }
  37. TEXTAREA {
  38.         BACKGROUND-COLOR: #f7f7f7; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
  39. }
  40. Checkbox {
  41.         BACKGROUND-COLOR: #f7f7f7; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
  42. }
  43. Radio {
  44.         BACKGROUND-COLOR: #f7f7f7; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
  45. }
  46. SELECT {
  47.         BACKGROUND-COLOR: #f7f7f7; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
  48. }
  49. INPUT {
  50.         BACKGROUND-COLOR: #f7f7f7; COLOR: #000000; FONT-SIZE: 9pt; PADDING-TOP: 3px
  51. }
  52. </STYLE>

  53. <SCRIPT language=JavaScript>
  54. function openwin(url){
  55.   splashWin = window.open(url, 'tip', 'fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0' );
  56.   splashWin.resizeTo (580,400);
  57.   splashWin.moveTo(100,50);
  58. }
  59. </SCRIPT>

  60. <SCRIPT language=JavaScript src="">
  61. </SCRIPT>

  62. <META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>
  63. <BODY bgColor=#008080 leftMargin=0 onload=begin() text=#000000 topMargin=0>
  64. <CENTER><BR>你是否发现很多论坛上都可以插入HTML代码的,但你直接插入时又无法显示,因为这种论坛使用的是YBB代码。看看下面吧。
  65. <FORM name=tool>
  66. <TABLE align=center bgColor=silver border=1 borderColorDark=white
  67. borderColorLight=black cellPadding=0 cellSpacing=0 width=420>
  68.   <TBODY>
  69.   <TR>
  70.     <TD align=middle height=20>YBB代码编辑器</TD></TR>
  71.   <TR>
  72.     <TD>
  73.       <TABLE border=0 cellPadding=1 cellSpacing=1>
  74.         <TBODY>
  75.         <TR>
  76.           <TD noWrap><IMG alt=加粗 border=0 height=22 onclick=bold()
  77.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht8(1).tmp" width=23><IMG
  78.             alt=倾斜 border=0 height=22 onclick=italicize()
  79.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mhtA(1).tmp" width=23><IMG
  80.             alt=下划线 border=0 height=22 onclick=underline()
  81.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mhtC(1).tmp" width=23> <IMG
  82.             alt=居中 border=0 height=22 onclick=center()
  83.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mhtE(1).tmp" width=23><IMG
  84.             alt=移动文字 border=0 height=22 onclick=marquee()
  85.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht10(1).tmp" width=23>
  86.             <IMG alt=保持格式 border=0 height=22 onclick=bao()
  87.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht12(1).tmp" width=23><IMG
  88.             alt=引用其它信息 border=0 height=22 onclick=yin()
  89.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht14(1).tmp" width=23>
  90.             <IMG alt=链接 border=0 height=22 onclick=hyperlink()
  91.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht16(1).tmp" width=23><IMG
  92.             alt=插入Email border=0 height=22 onclick=email()
  93.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht18(1).tmp" width=23><IMG
  94.             alt=插入图像 border=0 height=22 onclick=img()
  95.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht1A(1).tmp" width=23><IMG
  96.             alt=插入FLASH动画 border=0 height=22 onclick=flash()
  97.             src="F:\资料3\JavaScript\文章\YBB代码编辑器.files\mht1C(1).tmp" width=23></TD>
  98.           <TD align=right width="100%"><SELECT name=size
  99.             onchange=showsize(this.options[this.selectedIndex].value) size=1>
  100.               <OPTION selected value=1>8pt</OPTION> <OPTION
  101.               value=2>10pt</OPTION> <OPTION value=3>12pt</OPTION> <OPTION
  102.               value=4>14pt</OPTION> <OPTION value=5>16pt</OPTION> <OPTION
  103.               value=7>18pt</OPTION></SELECT><SELECT name=color
  104.             onchange=showcolor(this.options[this.selectedIndex].value)>
  105.               <OPTION selected style="COLOR: black" value=Black>黑色</OPTION>
  106.               <OPTION style="COLOR: silver" value=Silver>银色</OPTION> <OPTION
  107.               style="COLOR: gray" value=Gray>灰色</OPTION> <OPTION
  108.               style="COLOR: maroon" value=Maroon>茶色</OPTION> <OPTION
  109.               style="COLOR: red" value=Red>红色</OPTION> <OPTION
  110.               style="COLOR: purple" value=Purple>紫色</OPTION> <OPTION
  111.               style="COLOR: fuchsia" value=Fuchsia>紫红</OPTION> <OPTION
  112.               style="COLOR: green" value=Green>绿色</OPTION> <OPTION
  113.               style="COLOR: lime" value=Lime>亮绿</OPTION> <OPTION
  114.               style="COLOR: olive" value=Olive>橄榄</OPTION> <OPTION
  115.               style="COLOR: yellow" value=Yellow>黄色</OPTION> <OPTION
  116.               style="COLOR: teal" value=Teal>深蓝</OPTION> <OPTION
  117.               style="COLOR: blue" value=Blue>蓝色</OPTION> <OPTION
  118.               style="COLOR: teal" value=Teal>青色</OPTION> <OPTION
  119.               style="COLOR: aqua" value=Aqua>浅绿</OPTION> <OPTION
  120.               style="COLOR: pink" value=Pink>粉红</OPTION> <OPTION
  121.               style="COLOR: orange" value=Orange>橙色</OPTION> <OPTION
  122.               style="COLOR: brown" value=Brown>褐色</OPTION> <OPTION
  123.               style="COLOR: navy" value=Navy>海蓝</OPTION></SELECT>
  124.       </TD></TR></TBODY></TABLE></TD></TR>
  125.   <TR>
  126.     <TD align=right>
  127.       <TABLE border=0 cellPadding=1 cellSpacing=1 width=390>
  128.         <TBODY>
  129.         <TR>
  130.           <TD align=right width=32><FONT class=c size=1>文本</FONT><FONT class=c
  131.             face=Tahoma size=1>: </FONT></TD>
  132.           <CENTER></CENTER>
  133.           <TD width=344>
  134.             <P align=right><TEXTAREA cols=54 name=sample onchange=sampleupdate(this.value) style="OVERFLOW: auto"></TEXTAREA></P></TD></TR></TBODY></TABLE></TD></TR>
  135.   <CENTER>
  136.   <TR>
  137.     <TD align=right>
  138.       <TABLE border=0 cellPadding=1 cellSpacing=1 width=390>
  139.         <TBODY>
  140.         <TR>
  141.           <TD align=right vAlign=top width=35><FONT class=c
  142.             size=1>演示</FONT><FONT class=c face=Tahoma size=1>: </FONT></TD>
  143.           <TD>
  144.             <TABLE border=1 borderColorDark=white borderColorLight=black
  145.             cellPadding=0 cellSpacing=0 height=50 width="100%">
  146.               <TBODY>
  147.               <TR>
  148.                 <TD bgColor=white>
  149.                   <DIV
  150.     id=eOutput></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
  151.   <TR>
  152.     <TD align=right>
  153.       <TABLE border=0 cellPadding=1 cellSpacing=1>
  154.         <TBODY>
  155.         <TR>
  156.           <TD align=right vAlign=top width=35>代码:</TD>
  157.           <TD><TEXTAREA cols=54 name=ubbcode rows=5 style="OVERFLOW: auto"></TEXTAREA></TD></TR></TBODY></TABLE></TD></TR>
  158.   <TR>
  159.     <TD>
  160.       <TABLE border=0 cellPadding=1 cellSpacing=1 width="100%">
  161.         <TBODY>
  162.         <TR>
  163.           <TD>&nbsp;<INPUT onclick=window.close() style="BACKGROUND-COLOR: #008080; COLOR: #ffffff; FONT-SIZE: 9pt" type=button value=关闭>
  164. <INPUT onclick=begin() style="BACKGROUND-COLOR: #008080; COLOR: #ffffff; FONT-SIZE: 9pt" type=reset value=清除>
  165. <INPUT onclick=javascript:this.form.ubbcode.focus();this.form.ubbcode.select(); style="BACKGROUND-COLOR: #008080; COLOR: #ffffff; FONT-SIZE: 9pt" type=button value=选择全部>
  166. <INPUT onclick="openwin('ybb/help.htm')" style="BACKGROUND-COLOR: #008080; COLOR: #ffffff; FONT-SIZE: 9pt" type=button value=关于YBB></TD>
  167.           <TD align=right vAlign=bottom>程序改编:<A href="http://campo.3322.net/"
  168.             target=_blank>草原孤星</A>.
  169. </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM></CENTER></CENTER></BODY></HTML>

复制代码
 楼主| 发表于 2003-3-15 21:52:20 | 显示全部楼层
在网页上画出竖线


  1. <table width="1" cellspacing="0" cellpadding="0" align="center" height="300">
  2.   <td style=" BORDER-left: rgb(0,0,0) 1px dotted; dotted"> </td>
  3.   </tr>
  4. </table>
复制代码
 楼主| 发表于 2003-3-15 21:53:55 | 显示全部楼层
页面内的超级酷浮动窗口


  1. <!-- xWin by WildWind<http://wildcity.126.com> -->
  2. <html>
  3. <head>
  4. <title>_xWin</title>
  5. <style type='text/css'>
  6. <!--
  7. a:visited{text-decoration:none;color:slategray;}
  8. a:hover{text-decoration:underline;color:slategray;}
  9. a:link{text-decoration:none;color:slategray;}
  10. -->
  11. </style>
  12. <script language=JScript>
  13. <!--
  14. //可以打包为js文件;
  15. var x0=0,y0=0,x1=0,y1=0;
  16. var offx=6,offy=6;
  17. var moveable=false;
  18. var hover='orange',normal='slategray';//color;
  19. var index=10000;//z-index;
  20. //开始拖动;
  21. function startDrag(obj)
  22. {
  23.         if(event.button==1)
  24.         {
  25.                 //锁定标题栏;
  26.                 obj.setCapture();
  27.                 //定义对象;
  28.                 var win = obj.parentNode;
  29.                 var sha = win.nextSibling;
  30.                 //记录鼠标和层位置;
  31.                 x0 = event.clientX;
  32.                 y0 = event.clientY;
  33.                 x1 = parseInt(win.style.left);
  34.                 y1 = parseInt(win.style.top);
  35.                 //记录颜色;
  36.                 normal = obj.style.backgroundColor;
  37.                 //改变风格;
  38.                 obj.style.backgroundColor = hover;
  39.                 win.style.borderColor = hover;
  40.                 obj.nextSibling.style.color = hover;
  41.                 sha.style.left = x1 + offx;
  42.                 sha.style.top  = y1 + offy;
  43.                 moveable = true;
  44.         }
  45. }
  46. //拖动;
  47. function drag(obj)
  48. {
  49.         if(moveable)
  50.         {
  51.                 var win = obj.parentNode;
  52.                 var sha = win.nextSibling;
  53.                 win.style.left = x1 + event.clientX - x0;
  54.                 win.style.top  = y1 + event.clientY - y0;
  55.                 sha.style.left = parseInt(win.style.left) + offx;
  56.                 sha.style.top  = parseInt(win.style.top) + offy;
  57.         }
  58. }
  59. //停止拖动;
  60. function stopDrag(obj)
  61. {
  62.         if(moveable)
  63.         {
  64.                 var win = obj.parentNode;
  65.                 var sha = win.nextSibling;
  66.                 var msg = obj.nextSibling;
  67.                 win.style.borderColor     = normal;
  68.                 obj.style.backgroundColor = normal;
  69.                 msg.style.color           = normal;
  70.                 sha.style.left = obj.parentNode.style.left;
  71.                 sha.style.top  = obj.parentNode.style.top;
  72.                 obj.releaseCapture();
  73.                 moveable = false;
  74.         }
  75. }
  76. //获得焦点;
  77. function getFocus(obj)
  78. {
  79.         if(obj.style.zIndex!=index)
  80.         {
  81.                 index = index + 2;
  82.                 var idx = index;
  83.                 obj.style.zIndex=idx;
  84.                 obj.nextSibling.style.zIndex=idx-1;
  85.         }
  86. }
  87. //最小化;
  88. function min(obj)
  89. {
  90.         var win = obj.parentNode.parentNode;
  91.         var sha = win.nextSibling;
  92.         var tit = obj.parentNode;
  93.         var msg = tit.nextSibling;
  94.         var flg = msg.style.display=="none";
  95.         if(flg)
  96.         {
  97.                 win.style.height  = parseInt(msg.style.height) + parseInt(tit.style.height) + 2*2;
  98.                 sha.style.height  = win.style.height;
  99.                 msg.style.display = "block";
  100.                 obj.innerHTML = "0";
  101.         }
  102.         else
  103.         {
  104.                 win.style.height  = parseInt(tit.style.height) + 2*2;
  105.                 sha.style.height  = win.style.height;
  106.                 obj.innerHTML = "2";
  107.                 msg.style.display = "none";
  108.         }
  109. }
  110. //关闭;
  111. function cls(obj)
  112. {
  113.         var win = obj.parentNode.parentNode;
  114.         var sha = win.nextSibling;
  115.         win.style.visibility = "hidden";
  116.         sha.style.visibility = "hidden";
  117. }
  118. //创建一个对象;
  119. function xWin(id,w,h,l,t,tit,msg)
  120. {
  121.         index = index+2;
  122.         this.id      = id;
  123.         this.width   = w;
  124.         this.height  = h;
  125.         this.left    = l;
  126.         this.top     = t;
  127.         this.zIndex  = index;
  128.         this.title   = tit;
  129.         this.message = msg;
  130.         this.obj     = null;
  131.         this.bulid   = bulid;
  132.         this.bulid();
  133. }
  134. //初始化;
  135. function bulid()
  136. {
  137.         var str = ""
  138.                 + "<div id=xMsg" + this.id + " "
  139.                 + "style='"
  140.                 + "z-index:" + this.zIndex + ";"
  141.                 + "width:" + this.width + ";"
  142.                 + "height:" + this.height + ";"
  143.                 + "left:" + this.left + ";"
  144.                 + "top:" + this.top + ";"
  145.                 + "background-color:" + normal + ";"
  146.                 + "color:" + normal + ";"
  147.                 + "font-size:10px;"
  148.                 + "font-family:Verdana;"
  149.                 + "position:absolute;"
  150.                 + "cursor:default;"
  151.                 + "border:2px solid " + normal + ";"
  152.                 + "' "
  153.                 + "onmousedown='getFocus(this)'>"
  154.                         + "<div "
  155.                         + "style='"
  156.                         + "background-color:" + normal + ";"
  157.                         + "width:" + (this.width-2*2) + ";"
  158.                         + "height:20;"
  159.                         + "color:white;"
  160.                         + "' "
  161.                         + "onmousedown='startDrag(this)' "
  162.                         + "onmouseup='stopDrag(this)' "
  163.                         + "onmousemove='drag(this)' "
  164.                         + "ondblclick='min(this.childNodes[1])'"
  165.                         + ">"
  166.                                 + "<span style='width:" + (this.width-2*12-4) + ";padding-left:3px;'>" + this.title + "</span>"
  167.                                 + "<span style='width:12;border-width:0px;color:white;font-family:webdings;' onclick='min(this)'>0</span>"
  168.                                 + "<span style='width:12;border-width:0px;color:white;font-family:webdings;' onclick='cls(this)'>r</span>"
  169.                         + "</div>"
  170.                                 + "<div style='"
  171.                                 + "width:100%;"
  172.                                 + "height:" + (this.height-20-4) + ";"
  173.                                 + "background-color:white;"
  174.                                 + "line-height:14px;"
  175.                                 + "word-break:break-all;"
  176.                                 + "padding:3px;"
  177.                                 + "'>" + this.message + "</div>"
  178.                 + "</div>"
  179.                 + "<div style='"
  180.                 + "width:" + this.width + ";"
  181.                 + "height:" + this.height + ";"
  182.                 + "top:" + this.top + ";"
  183.                 + "left:" + this.left + ";"
  184.                 + "z-index:" + (this.zIndex-1) + ";"
  185.                 + "position:absolute;"
  186.                 + "background-color:black;"
  187.                 + "filter:alpha(opacity=40);"
  188.                 + "'>by wildwind</div>";
  189.         document.body.insertAdjacentHTML("beforeEnd",str);
  190. }
  191. //-->
  192. </script>

  193. <script language='JScript'>
  194. <!--
  195. function initialize()
  196. {
  197.         var a = new xWin("1",160,200,200,200,"Message","xWin <br> A Cool Pop Div Window<br>Version:1.0<br>2002-8-13");
  198.         var b = new xWin("2",240,200,100,100,"Wildwind's Msgbox","Welcome to visited my personal website:<br><a href=http://www14.brinkster.com/wildcity target=_blank>http://wildcity.126.com</a><br>and u can also sign my guestbook at:<br><a href=http://www14.brinkster.com/wildcity/gbook target=_blank>http://wildcity.126.com/gbook</a><br><br>thx!!! =)...");
  199.         var c = new xWin("3",200,160,250,50,"Copyright","Copyright by <a href='mailto:wildwind_zz@21cn.com'>Wildwind</a>!");
  200. }
  201. window.onload = initialize;
  202. //-->
  203. </script>
  204. </head>
  205. <body onselectstart='return false' oncontextmenu='return false' scroll='no'>
  206. </body>
  207. </html>

复制代码
 楼主| 发表于 2003-3-15 21:54:31 | 显示全部楼层
全面禁止鼠标右键、FX、Alt、Ctrl、Shift等



  1. <html><head><TITLE>整个世界都清净了^_^   power by swans</TITLE> </head>
  2. <script>
  3. function onKeyDown()
  4. {
  5.         if ((event.keyCode==116)||(window.event.ctrlKey)||(window.event.shiftKey)||(event.keyCode==122))
  6.         {
  7.         event.keyCode=0;
  8.         event.returnValue=false;
  9.         }
  10. }
  11. </script>

  12. <script>
  13. function yxl() {
  14. if(window.event.altKey)
  15. {
  16. window.event.returnValue=false;
  17. }
  18. }
  19. document.onkeydown=yxl
  20. </script>
  21. <body  bgcolor="#000000" text="#666666"  onkeydown="onKeyDown()" oncontextmenu="return false" onselectstart="return false" ondragstart="return false"  >
  22. <p>该页面禁止了鼠标右键,F5、F11、“应用程序”键,所有与alt、ctrl和shift有关的组合键(当然alt+f4和alt+home没有屏蔽),并且禁止了鼠标文本选择,你可以试试:)
  23.   够全了吧?</p>
  24. <p>&nbsp;</p>
  25. <p>如有问题可以到<a href="http://swans.126.com"><font color="#99FF33" size="6">http://swans.126.com</font></a>提问。</p>
  26. </body>
  27. </html>

复制代码
 楼主| 发表于 2003-3-15 21:55:03 | 显示全部楼层
色带(选择颜色)


  1. <input id=kkk1 style=position:absolute;left:0;top:0>
  2. <input id=kkk2 style=position:absolute;left:200;top:0>
  3. <input id=kkk3 style=position:absolute;left:400;top:0>
  4. <input id=kkk4 style=position:absolute;left:600;top:0>
  5. <div id=RainBowDiv style='position:absolute;left:200;top:30;'></div>

  6. <script>
  7. var iW = '70';//共有6种颜色,每种颜色的宽为iW。iW*6为色带的宽。
  8. var iH = '400';//iH为色带的高。

  9. //计算HSV颜色代码。
  10. function HSV(){
  11. kkk1.value = 'X:'+event.offsetX+'   Y:'+event.offsetY;
  12. var H,S,V;
  13. var pY = event.offsetY;
  14. if(pY == 0){H = S = 0; V = 100;}
  15. else{
  16.         if(pY == iH-1) H = S = V = 0;
  17.         else{
  18.                 H = Math.floor(360*event.offsetX/(iW*6));
  19.                 S = Math.round(50*(iH-pY)/(iH/2));
  20.                 V = Math.round(100-50*pY/iH);
  21.                 }
  22.         }
  23. kkk2.value='HSV('+H+','+S+'%,'+V+'%)';
  24. HSVtoRGB(H,S/100,V/100);
  25. }


  26. //计算RGB颜色代码。
  27. function HSVtoRGB(h,s,v){
  28. var i, f ,p1 ,p2 ,p3;
  29. var r = g = b = 0;
  30. if(s < 0) s=0;
  31. if(s > 1) s=1;
  32. if(v < 0) v=0;
  33. if(v > 1) v=1;
  34. h %= 360;
  35. if(h < 0) h+=360;
  36. h /= 60;
  37. i = Math.floor(h);
  38. f = h-i;
  39. p1 = v*(1-s);
  40. p2 = v*(1-s*f);
  41. p3 = v*(1-s*(1-f));
  42. if(i == 0){r=v; g=p3; b=p1;}
  43. else if(i == 1){r=p2; g=v; b=p1;}
  44. else if(i == 2){r=p1; g=v; b=p3;}
  45. else if(i == 3){r=p1; g=p2; b=v;}
  46. else if(i == 4){r=p3; g=p1; b=v;}
  47. else if(i == 5){r=v; g=p1; b=p2;}
  48. kkk3.value='RGB('+Math.round(r*255)+','+Math.round(g*255)+','+Math.round(b*255)+')';
  49. RGBtoHTML(Math.round(r*255),Math.round(g*255),Math.round(b*255))
  50. }


  51. //计算HTML颜色代码。
  52. function RGBtoHTML(r,g,b){
  53. r=(r>=16)?r.toString(16):('0'+r.toString(16))
  54. g=(g>=16)?g.toString(16):('0'+g.toString(16))
  55. b=(b>=16)?b.toString(16):('0'+b.toString(16))
  56. kkk4.value='HTML #'+r+g+b;
  57. }

  58. /*
  59. Dewin 写于 2002-08-17 10:37
  60. */
  61. function window.onload(){
  62. var RainBow = new Array(255,0,0,  255,255,0,  0,255,0,  0,255,255,  0,0,255,  255,0,255,  255,0,0);
  63. for(var i=0;i<6;i++){
  64.         var R1 = RainBow[i*3];
  65.         var G1 = RainBow[i*3+1];
  66.         var B1 = RainBow[i*3+2];
  67.         var R2 = RainBow[(i+1)*3];
  68.         var G2 = RainBow[(i+1)*3+1];
  69.         var B2 = RainBow[(i+1)*3+2];
  70.         RainBowDiv.innerHTML += "<div style='position:absolute;left:"+i*iW+";top:0;width:"+iW+";height:"+iH+";background:rgb("+R1+","+G1+","+B1+");'></div><div style='position:absolute;left:"+i*iW+";top:0;width:"+iW+";height:"+iH+";background:rgb("+R2+","+G2+","+B2+");filter:alpha(opacity=0,finishopacity=100,Style=1);'></div>"
  71.         }
  72. RainBowDiv.innerHTML += "<div style=position:absolute;left:0;top:0;width:"+6*iW+";height:"+iH+";background:rgb(128,128,128);filter:alpha(opacity=0,finishOpacity=100,style=1,starty=0,finishy=100,startx=0,finishx=0)></div><div style='position:absolute;left:0;top:0;width:"+(6*iW+1)+";height:"+iH+";' onmousemove=HSV()></div>"
  73. }
  74. </script>

复制代码
 楼主| 发表于 2003-3-15 21:56:05 | 显示全部楼层
限制输入08:00-09:00的正则表达式


  1. <input onkeyup="value=value.replace(/[^\d,.,:.,-]/g,'') >
复制代码
 楼主| 发表于 2003-3-15 21:56:51 | 显示全部楼层
不用js就将一个对象定位在页面顶部并随页面滚动


  1. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  2. <div style="position:absolute;height:10pt;top:expression(document.body.clientHeight-this.style.pixelHeight+document.body.scrollTop);font:9pt;">怎样不用js就将一个对象定位在页面顶部并随页面滚动?以前有这个贴子的,好象是用什么属性的。唉!无忧真是应该做个搜索啊!
  3. </div>

复制代码
 楼主| 发表于 2003-3-15 21:57:23 | 显示全部楼层
Cool,让网页开口说任意英语!(默林的应用)


  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <!-- saved from url=(0039)http://www.5meng.com/test/en_dialog.htm -->
  3. <HTML><HEAD><TITLE>Microsoft Agent Characters Dialog</TITLE>
  4. <META content="text/html; charset=gb2312" http-equiv=Content-Type>
  5. <META content=NOINDEX name=ROBOTS>
  6. <META content="MSHTML 5.00.3502.5390" name=GENERATOR></HEAD>
  7. <BODY bgColor=#000000 link=#ffff00 text=#ffffff topMargin=0 vLink=#00ffff>
  8. <P><FONT face=verdana,arial,helvetica size=2>
  9. <OBJECT align=baseline classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F
  10. codeBase=#VERSION=2,0,0,0 height=32 id=AgentControl width=32
  11. border="0"></OBJECT>
  12. <OBJECT align=baseline classid=CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575
  13. codeBase=#VERSION=6,0,0,0 height=50 id=TruVoice width=50 border="0"></OBJECT>
  14. <SCRIPT language=JScript>

  15. //var Merlin;                // a global variable to hold the character object
  16. //var Peedy;
  17. //var PeedyRequest;
  18. var UserName="";
  19. var sp1;
  20. var sp2;
  21. var anim_a;
  22. var anim_b;
  23. var char1Request;
  24. var char2Request;
  25. var char1;
  26. var char2;
  27. var char1ID;
  28. var char1ID;
  29. var bCharsLoaded=false;
  30. var Char1Animation;
  31. var Char2Animation;

  32. function doCharDlg()
  33. {
  34. if(bCharsLoaded==false){
  35. alert("你必须先读取角色!");
  36. return;
  37. }

  38. Move1();

  39. }
  40. function Move1()
  41. {
  42. sp1=document.forms.Dlg1("a1Text").value;
  43. sp2=document.forms.Dlg1("b1Text").value;

  44. anim_a=Dlg1.a1Animation.value ;
  45. anim_b=Dlg1.b1Animation.value ;
  46. char1.Get("animation", anim_a);
  47. char2.Get("animation", anim_b);

  48. char1.Stop(Char1Animation);
  49. char2.Stop(Char2Animation);

  50. if(sp1.length>0){
  51. char1.Play(anim_a);
  52. char1Request=char1.Speak(sp1);
  53. }
  54. if(sp2.length>0){

  55. char2.Wait(char1Request);
  56. char2.Play(anim_b);
  57. char2Request=char2.Speak(sp2);
  58. }
  59. }


  60. function LoadChars() {
  61. if(UserName.length<1){
  62. UserName=SelectChar("MyName").value;
  63. if(UserName.length<1){
  64. alert("请输入你的姓名.");
  65. return;
  66. }
  67. }
  68. if(bCharsLoaded==true){
  69. AgentControl.Characters.Unload(char1ID);
  70. AgentControl.Characters.Unload(char2ID);

  71. }
  72. char1ID=SelectChar.Char1.value ;
  73. char2ID=SelectChar.Char2.value ;
  74. if(char1ID==char2ID){
  75. alert("你必须选择不同的角色!");
  76. return;
  77. }
  78.         AgentControl.Connected = true;        //  necessary for IE3
  79.         if(char1ID=="Merlin")
  80.         //AgentControl.Characters.Load(char1ID, "merlin.acs");
  81.         AgentControl.Characters.Load(char1ID, "http://agent.microsoft.com//agent2//chars//merlin//merlin.acf");

  82.         else if(char1ID=="Peedy")
  83.         //AgentControl.Characters.Load(char1ID, "peedy.acs");
  84. AgentControl.Characters.Load(char1ID, "http://agent.microsoft.com//agent2//chars//peedy//peedy.acf");

  85.         else if(char1ID=="Genie")
  86.         //AgentControl.Characters.Load(char1ID, "genie.acs");
  87. AgentControl.Characters.Load(char1ID, "http://agent.microsoft.com//agent2//chars//genie//genie.acf");

  88.         else if(char1ID=="Robby")
  89.         //AgentControl.Characters.Load(char1ID, "robby.acs");
  90. AgentControl.Characters.Load(char1ID, "http://agent.microsoft.com//agent2//chars//robby//robby.acf");

  91.         if(char2ID=="Merlin")
  92.         //AgentControl.Characters.Load(char2ID, "merlin.acs");
  93. AgentControl.Characters.Load(char2ID, "http://agent.microsoft.com//agent2//chars//merlin//merlin.acf");

  94.         else if(char2ID=="Peedy")
  95.         //AgentControl.Characters.Load(char2ID, "peedy.acs");
  96. AgentControl.Characters.Load(char2ID, "http://agent.microsoft.com//agent2//chars//peedy//peedy.acf");

  97.         else if(char2ID=="Genie")
  98.         //AgentControl.Characters.Load(char2ID, "genie.acs");
  99. AgentControl.Characters.Load(char2ID, "http://agent.microsoft.com//agent2//chars//genie//genie.acf");

  100.         else if(char2ID=="Robby")
  101.         //AgentControl.Characters.Load(char2ID, "robby.acs");
  102. AgentControl.Characters.Load(char2ID, "http://agent.microsoft.com//agent2//chars//robby//robby.acf");


  103.         char1 = AgentControl.Characters.Character(char1ID);
  104.         char1.LanguageID = 0x0409;                //  needed under come conditions
  105.         char1.Get("state", "Showing, Speaking");
  106.         char1.Get("animation", "Greet");
  107.         char2 = AgentControl.Characters.Character(char2ID);
  108.         char2.LanguageID = 0x0409;                //  needed under come conditions
  109.         char2.Get("state", "Showing, Speaking");
  110.         char2.Get("animation", "Greet, GreetReturn,Suggest,idle2_1");

  111. char1.MoveTo(300,100);               
  112. char1.Show();
  113. char1.Play("Greet");       
  114. char1Request=char1.Speak("Hi there, "+ UserName);
  115.                 // Note that use of the Character method, which is optional in VBScript, is required in JScript
  116.         char2.Wait(char1Request);
  117.                                         // Note that JScript strings require 2 slashes for every single slash in a string
  118.         char2.Show();

  119.         //char2.Get("state", "Hiding");
  120.         char2.Play("Greet");
  121.         char2Request=char2.Speak("Hello " + UserName);
  122.        
  123. char2.MoveTo(400,100);               

  124. char2.Get("animation", "idle2_1");
  125. Char2Animation=char2.Play("idle2_1");

  126. char1.Wait(char2Request);
  127. char1.MoveTo(100,100);       
  128. char1.Get("animation", "Suggest,idle2_2");
  129. Char1Animation=char1.Play("idle2_2");
  130. bCharsLoaded=true;
  131. }

  132. </SCRIPT>
  133. </FONT></P>
  134. <FORM name=SelectChar>
  135. <TABLE border=0 width=642>
  136.   <TBODY>
  137.   <TR>
  138.     <TD width=90><FONT color=#ffff00 face=verdana,arial,helvetica
  139.       size=2>名字</FONT></TD>
  140.     <TD width=222><FONT face=verdana,arial,helvetica size=2><INPUT name=MyName
  141.       value="Chen Sung-lim."> </FONT></TD></TR>
  142.   <TR>
  143.     <TD width=90><FONT color=#ffff00 face=verdana,arial,helvetica size=2>角色
  144.       1</FONT></TD>
  145.     <TD width=222><FONT face=verdana,arial,helvetica size=2><SELECT name=Char1
  146.       size=1> <OPTION selected value=Merlin>Merlin</OPTION> <OPTION
  147.         value=Peedy>Peedy</OPTION> <OPTION value=Genie>Genie</OPTION> <OPTION
  148.         value=Robby>Robby</OPTION></SELECT> </FONT></TD>
  149.     <TD width=82><FONT color=#ffff00 face=verdana,arial,helvetica size=2>角色
  150.       2</FONT></TD>
  151.     <TD width=74><FONT face=verdana,arial,helvetica size=2><SELECT name=Char2
  152.       size=1> <OPTION selected value=Peedy>Peedy</OPTION> <OPTION
  153.         value=Merlin>Merlin</OPTION> <OPTION value=Genie>Genie</OPTION> <OPTION
  154.         value=Robby>Robby</OPTION></SELECT> </FONT></TD>
  155.     <TD width=152><FONT face=verdana,arial,helvetica size=2><INPUT onclick=LoadChars() type=button value=读入角色>
  156.   <BR></FONT></TD></TR></TBODY></TABLE></FORM>
  157. <FORM name=Dlg1>
  158. <TABLE border=0>
  159.   <TBODY>
  160.   <TR>
  161.     <TD width=64><FONT face=verdana,arial,helvetica size=2>对话 1</FONT></TD>
  162.     <TD width=502><FONT face=verdana,arial,helvetica size=2><INPUT
  163.       maxLength=256 name=a1Text size=60 value="My name is Chen Sung-lim.">
  164.       </FONT></TD>
  165.     <TD width=206><FONT face=verdana,arial,helvetica size=2>动作 <SELECT
  166.       name=a1Animation size=1> <OPTION selected
  167.         value=Acknowledge>Acknowledge</OPTION> <OPTION
  168.         value=Alert>Alert</OPTION> <OPTION value=Announce>Announce</OPTION>
  169.         <OPTION value=Blink>Blink</OPTION> <OPTION
  170.         value=Confused>Confused</OPTION> <OPTION
  171.         value=Congratulate>Congratulate</OPTION> <OPTION
  172.         value=Decline>Decline</OPTION> <OPTION value=DoMagic1>Do magic
  173.         (1)</OPTION> <OPTION value=DoMagic2>Do magic (2)</OPTION> <OPTION
  174.         value=GetAttention>Get attention</OPTION> <OPTION
  175.         value=GestureUp>Gesture up</OPTION> <OPTION value=GestureDown>Gesture
  176.         down</OPTION> <OPTION value=GestureLeft>Gesture left</OPTION> <OPTION
  177.         value=GestureRight>Gesture right</OPTION> <OPTION
  178.         value=Explain>Explain</OPTION> <OPTION value=Greet>Greet</OPTION>
  179.         <OPTION value=LookDown>Look down</OPTION> <OPTION value=LookUp>Look
  180.         up</OPTION> <OPTION value=LookLeft>Look left</OPTION> <OPTION
  181.         value=LookRight>Look right</OPTION> <OPTION value=MoveDown>Move
  182.         down</OPTION> <OPTION value=MoveUp>Move up</OPTION> <OPTION
  183.         value=MoveLeft>Move left</OPTION> <OPTION value=MoveRight>Move
  184.         right</OPTION> <OPTION value=Pleased>Pleased</OPTION> <OPTION
  185.         value=Process>Process</OPTION> <OPTION value=Read>Read</OPTION> <OPTION
  186.         value=Sad>Sad</OPTION> <OPTION value=Search>Search</OPTION> <OPTION
  187.         value=Suggest>Suggest</OPTION> <OPTION
  188.         value=Surprised>Surprised</OPTION> <OPTION value=Think>Think</OPTION>
  189.         <OPTION value=Uncertain>Uncertain</OPTION> <OPTION
  190.         value=Wave>Wave</OPTION> <OPTION value=Write>Write</OPTION></SELECT>
  191.       </FONT></TD></TR>
  192.   <TR>
  193.     <TD width=64><FONT face=verdana,arial,helvetica size=2>对话 2</FONT></TD>
  194.     <TD width=502><FONT face=verdana,arial,helvetica size=2><INPUT
  195.       maxLength=256 name=b1Text size=60
  196.       value="How do you do? My name is Fred Smith."> </FONT></TD>
  197.     <TD width=206><FONT face=verdana,arial,helvetica size=2>动作 <SELECT
  198.       name=b1Animation size=1> <OPTION selected
  199.         value=Acknowledge>Acknowledge</OPTION> <OPTION
  200.         value=Alert>Alert</OPTION> <OPTION value=Announce>Announce</OPTION>
  201.         <OPTION value=Blink>Blink</OPTION> <OPTION
  202.         value=Confused>Confused</OPTION> <OPTION
  203.         value=Congratulate>Congratulate</OPTION> <OPTION
  204.         value=Decline>Decline</OPTION> <OPTION value=DoMagic1>Do magic
  205.         (1)</OPTION> <OPTION value=DoMagic2>Do magic (2)</OPTION> <OPTION
  206.         value=GetAttention>Get attention</OPTION> <OPTION
  207.         value=GestureUp>Gesture up</OPTION> <OPTION value=GestureDown>Gesture
  208.         down</OPTION> <OPTION value=GestureLeft>Gesture left</OPTION> <OPTION
  209.         value=GestureRight>Gesture right</OPTION> <OPTION
  210.         value=Explain>Explain</OPTION> <OPTION value=Greet>Greet</OPTION>
  211.         <OPTION value=LookDown>Look down</OPTION> <OPTION value=LookUp>Look
  212.         up</OPTION> <OPTION value=LookLeft>Look left</OPTION> <OPTION
  213.         value=LookRight>Look right</OPTION> <OPTION value=MoveDown>Move
  214.         down</OPTION> <OPTION value=MoveUp>Move up</OPTION> <OPTION
  215.         value=MoveLeft>Move left</OPTION> <OPTION value=MoveRight>Move
  216.         right</OPTION> <OPTION value=Pleased>Pleased</OPTION> <OPTION
  217.         value=Process>Process</OPTION> <OPTION value=Read>Read</OPTION> <OPTION
  218.         value=Sad>Sad</OPTION> <OPTION value=Search>Search</OPTION> <OPTION
  219.         value=Suggest>Suggest</OPTION> <OPTION
  220.         value=Surprised>Surprised</OPTION> <OPTION value=Think>Think</OPTION>
  221.         <OPTION value=Uncertain>Uncertain</OPTION> <OPTION
  222.         value=Wave>Wave</OPTION> <OPTION value=Write>Write</OPTION></SELECT>
  223.       </FONT></TD></TR></TBODY></TABLE>
  224. <P align=center><FONT face=verdana,arial,helvetica size=2><INPUT onclick=doCharDlg() type=button value=" 对话 ">
  225. <BR></FONT></P></FORM>
  226. <P align=center>&nbsp;</P>
  227. <TABLE align=center border=0 width="92%">
  228.   <TBODY>
  229.   <TR>
  230.     <TD>可以在<FONT color=#00ffff><B><FONT
  231.       color=#66ff99><I>"名字"</I></FONT></B></FONT>栏输入任意名字,然后选择两个不同的<I><B><FONT
  232.       color=#66ff00>角色</FONT></B></I>,点"<FONT
  233.       color=#66ff00><B><I>读入角色</I></B></FONT>";<BR>在"<I><B><FONT
  234.       color=#66ff00>对话1</FONT></B></I>"和"<I><B><FONT
  235.       color=#66ff00>对话2</FONT></B></I>"文本框中可以输入英文句子,在"<I><B><FONT
  236.       color=#66ff00>动作</FONT></B></I>"处可以选择不同动作,然后点击"对话"按钮。<BR>在windows2000系统上应该可以直接运行,至于win98可能会有问题。<BR>*
  237.       如果有问题,按F5键刷新一下试试看。<BR><BR>欢迎大家讨论此问题,特别是这个东东不能够读取中文,应该有其它方法使之可以读取中文吧?!<BR>Email:
  238.       <A href="mailto:wingfancy@etang.com">wingfancy@etang.com</A> <BR>URL: <A
  239.       href="http://www.5meng.com/"
  240.   target=_blank>http://www.5meng.com/</A></TD></TR></TBODY></TABLE>
  241. <P align=center><FONT face=verdana,arial,helvetica
  242. size=3></FONT>&nbsp;</P></BODY></HTML>

复制代码
 楼主| 发表于 2003-3-15 21:59:13 | 显示全部楼层
组合输入框

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

  2. <html>
  3. <head>
  4.         <title>ComboBox Demo</title>

  5. <style>
  6. body          {font-size:9pt;font-family:verdana;}
  7. button        {cursor:hand;border:1px solid black;font-family:arial;font-size:9pt;}
  8. a             {color:red;}
  9. a:hover       {color:blue}
  10. </style>

  11. </head>

  12. <body>
  13. <script src="ComboBox.js"></script>

  14. <script>

  15. dm=new ComboBox("dm")

  16. dm.add(
  17.        new ComboBoxItem("barge",1),
  18.        new ComboBoxItem("benluc",2),
  19.        new ComboBoxItem("benlieeeeck",3),
  20.        new ComboBoxItem("taco",4)
  21.       )
  22. /*
  23. // generate 1000 more to test performance
  24. for (var i = 0; i < 100; i++ )
  25.         dm.add(new ComboBoxItem(String(i)));
  26. */

  27. </script>

  28. <br><br><br>

  29. <button hidefocus onClick="alert(dm.value)">Show Value</button>&nbsp;<button hidefocus
  30. onClick="dm.add(new ComboBoxItem(window.prompt('Type in the text to add',''),window.prompt('Type in a value to add','')))"
  31. >Add Item</button>&nbsp;<button hidefocus onClick="dm.remove(window.prompt('Type in an index to remove',''))"
  32. >Remove Item</button>
  33. <br>
  34. <br>

  35. </body>
  36. </html>

复制代码
 楼主| 发表于 2003-3-15 22:00:03 | 显示全部楼层
QQ ASCII 图像工具


  1. <html>

  2. <head>
  3. <meta http-equiv="Content-Language" content="zh-cn">
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  6. <meta name="ProgId" content="FrontPage.Editor.Document">
  7. <title>QQ ASCII 图像工具</title>
  8. <style>
  9. A {text-decoration: none}
  10. .TheInput {color: #0034A0; border: 1 solid #0034A0; font-size: 10pt}
  11. .TheButton {background-color: #C8DCFF; color: #0034A0; font-family: Arial; font-size: 10pt; border: 1 solid #0034A0}

  12. TD {background-color: #F0F4FF; color: #000000; cursor: default}
  13. </style>
  14. </head>

  15. <body bgcolor="#F0F4FF">
  16. <script>
  17. function MakeBoard()
  18. {

  19.        
  20.         for(i=theBoard.rows.length-1;i>=0;i--)
  21.         {
  22.                 theBoard.deleteRow()
  23.         }
  24.        
  25.         var H,W

  26.        
  27.         H = parseInt(BH.value)
  28.         W = parseInt(BW.value)
  29.        
  30.         for(i=0;i<H;i++)
  31.         {
  32.                 with(theBoard.insertRow())
  33.                 {
  34.                
  35.                         for(j=0;j<W;j++)
  36.                         {
  37.                        
  38.                                 with(insertCell())
  39.                                 {
  40.                                         innerText = " "
  41.                                 }       

  42.                         }
  43.                 }
  44.         }
  45.                

  46.        
  47. }

  48. var DrawStyle = 0


  49. function document.onkeydown()
  50. {
  51.         if(event.keyCode==17)
  52.                 DrawStyle = 1
  53.         if(event.keyCode==16)       
  54.                 DrawStyle = 2
  55. }

  56. function document.onkeyup()
  57. {
  58.         DrawStyle = 0
  59. }

  60. function Boardonmousemove()
  61. {
  62.         if(DrawStyle>0)
  63.         {
  64.                 if(event.srcElement.tagName=="TD")
  65.                 {
  66.                         if(DrawStyle==1)
  67.                                 event.srcElement.innerText = PS.value
  68.                         else
  69.                                 event.srcElement.innerText = " "       
  70.                 }
  71.         }
  72. }

  73. function MakeImgText()
  74. {
  75.        
  76.         if(theBoard.rows.length<1)
  77.         {
  78.                 alert("你没有生成画板")
  79.                 return;
  80.         }
  81.        
  82.                 var H = theBoard.rows.length
  83.                 var W = theBoard.rows(0).cells.length
  84.                
  85.                 var ImgText = ""

  86.        
  87.         for(i=0;i<H;i++)
  88.         {
  89.                 for(j=0;j<W;j++)
  90.                 {

  91.                         ImgText +=         theBoard.rows(i).cells(j).innerText
  92.                 }
  93.                
  94.                 ImgText += "\r\n"
  95.                
  96.         }
  97.        
  98.         ImgTextBox.value = ImgText
  99.        
  100.         ImgText = ""

  101. }

  102. function showHelp()
  103. {
  104.         var helpstr =  "QQ ASCII 图像工具" + "\r\n\r\n" +
  105.                
  106.                                         "作者:stroll Mail: csy-163@163.com" + "\r\n" +
  107.                                        
  108.                                         "使用说明:"  + "\r\n" +
  109.                                        
  110.                                         "按住 Ctrl键 在画板上移动鼠标可以画出你定义的画笔样式的字"  + "\r\n" +
  111.                                        
  112.                                         "按住 Shift键 在画板上移动鼠标可以清除你填写的字"   + "\r\n"
  113.                                        
  114.         alert(helpstr)                       
  115.                                        
  116.                                        
  117.                                        
  118.                                        
  119. }
  120. </script>
  121. <div align="center">
  122.   <center>

  123. <table border="0" bgcolor="#A0B8F0">
  124.   <tr>
  125.     <td width="566" height="40" valign="middle" style="background-color: #6888E0">
  126.       <table border="0" width="100%" cellspacing="0" cellpadding="0" style="color: #FFFFFF; font-size: 10pt">
  127.         <tr>
  128.           <td width="25%" style="background-color: #6888E0; color: #F0F4FF; text-indent: 14">
  129.           <nobr>
  130.           修改画笔样式 <input type="text" id="PS" size="3" class="TheInput" style="text-align: center" value="*"  maxlength=1 onmouseover=with(this){select();focus()}>
  131.           </nobr>
  132.           </td>
  133.           <td width="25%" style="background-color: #6888E0; color: #F0F4FF">
  134.           <nobr>
  135.           输入画布的 宽度<input type="text" id="BW" size="4" class="TheInput" style="text-align: center" onmouseover=with(this){select();focus()} onkeyup='this.value=this.value.replace(/\D/gi,"")'>
  136.           </nobr>
  137.           </td>
  138.           <td width="25%" style="background-color: #6888E0; color: #F0F4FF">
  139.           <nobr>
  140.           高度<input type="text" id="BH" size="4" class="TheInput" style="text-align: center" onmouseover=with(this){select();focus()} onkeyup='this.value=this.value.replace(/\D/gi,"")'>
  141.           </nobr>
  142.           </td>
  143.           <td width="25%" align="center" style="background-color: #6888E0; color: #F0F4FF">
  144.           <nobr>
  145.           <input type="button" value="生成画布" class="TheButton" onclick=MakeBoard()>&nbsp; <input type="button" value="帮助" class="TheButton" onclick=showHelp()>                                                                                       
  146.             </nobr>                                                
  147.           </td>                                                
  148.         </tr>                                                
  149.       </table>                                                
  150.     </td>                                                   
  151.   </tr>                                                   
  152.   <tr>                                                   
  153.     <td width="100%" bgcolor="#F0F4FF" height="260">                                                
  154.       <div align="center">                                                
  155.         <center id="mapbox">                                                
  156. <table id="theBoard" border="0" bgcolor="#CEDCFF" style="font-size: 8pt" cellspacing="1" onselectstart="return false" onmousemove="Boardonmousemove()" onmouseout="DrawStyle = 0">                           
  157. </table>                                                     
  158.         </center>                                               
  159.       </div>                                               
  160.     </td>                                                
  161.   </tr>                                                
  162.   <tr>                                               
  163.     <td width="566" bgcolor="#F0F4FF" height="43" style="background-color: #6888E0; color: #F0F4FF; text-indent: 3">                                                
  164.           <nobr>                                               
  165.           &nbsp;                                             
  166.           <input type="button" value="生成图形文本" class="TheButton" onclick=MakeImgText()>&nbsp;                                             
  167.           <input type="button" value="拷贝图形文本" class="TheButton" onclick='ImgTextBox.select();document.execCommand("Copy");document.execCommand("Unselect")'>                                                                                    
  168.           </nobr>                                               
  169.     </td>                                                
  170.   </tr>                                             
  171.   <tr>                                             
  172.     <td width="566" bgcolor="#F0F4FF" height="43" style="background-color: #6888E0; color: #F0F4FF; text-indent: 14" align="center">                                               
  173.           <nobr>                                             
  174.           &nbsp;                                                                                      
  175.             </nobr>                                                
  176.           <br>                                             
  177.           <textarea rows="15" id="ImgTextBox" cols="62" class="TheInput"></textarea>                                               
  178.           <br>                                             
  179.           <br>                                             
  180.     </td>                                                
  181.   </tr>                                             
  182. </table>                                                
  183.                                                 
  184.   </center>                                             
  185. </div>                                             
  186.                                                 
  187. </body>                                                
  188.                                                 
  189. </html>                                                


复制代码
 楼主| 发表于 2003-3-15 22:01:06 | 显示全部楼层
呵呵,就到这里吧。
以后再贴更多。
发表于 2003-3-15 23:49:36 | 显示全部楼层
辛苦了:),支持!
 楼主| 发表于 2003-3-17 17:59:21 | 显示全部楼层
让表格半透明


  1. <body bgcolor="red">
  2. This is body!
  3. <div style="position:absolute;background:black;filter:Alpha(Opacity=50);color:white;height:300;top:0;left:0">This is layer!</div>
  4. </body>
复制代码
 楼主| 发表于 2003-3-17 17:59:56 | 显示全部楼层
让表格透明 2


  1. <body style="filter:Alpha(Opacity=50)">
  2. <iframe width="100%" height="100%" src="http://sina.com.cn">
复制代码
 楼主| 发表于 2003-3-17 18:00:31 | 显示全部楼层
仿 DOS 窗口


  1. <STYLE>BODY {

  2.         FONT-SIZE: 10pt; CURSOR: default; COLOR: rgb(160,160,160); FONT-FAMILY: Fixedsys; BACKGROUND-COLOR: black;scroll=no

  3. }

  4. A {

  5.         FONT-SIZE: 10pt; CURSOR: default; COLOR: rgb(160,160,160); FONT-FAMILY: Fixedsys; BACKGROUND-COLOR: black; TEXT-DECORATION: none

  6. }

  7. A:hover {

  8.         TEXT-DECORATION: underline overline

  9. }

  10. .input {

  11.         BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 10pt; BORDER-BOTTOM-COLOR: rgb(0,0,0); CURSOR: text; COLOR: rgb(160,160,160); FONT-FAMILY: Fixedsys; BACKGROUND-COLOR: black; BORDER-RIGHT-WIDTH: 0px

  12. }

  13. </STYLE>



  14. <OBJECT id=closes type=application/x-oleobject

  15. classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11><PARAM NAME="Command" VALUE="Close"></OBJECT>

  16. <script>

  17. function getfocus(){

  18. document.shuru.dos.focus()

  19. if(event.keyCode==13){

  20. judge();

  21. document.shuru.dos.blur();}

  22. }

  23. document.onkeydown=getfocus;

  24. </script>

  25. <SCRIPT language=javascript>



  26. var ttime=0,tip='_',zhi



  27. function flash(){



  28. ttime++



  29. if(ttime%2==1){



  30. tip=''



  31. var gett=document.shuru.dos.value



  32. var len=gett.length;



  33. document.shuru.dos.value=gett.substring(0,len-1)+tip}



  34. else{



  35. tip='_'



  36. document.shuru.dos.value=document.shuru.dos.value+tip}



  37. if(ttime>100)



  38. ttime=0



  39. zhi=setTimeout("flash()",200)



  40. }



  41. function shutdown(){



  42. window.open('http://www.haiyang.tk')



  43. closes.Click()



  44. }



  45. function errorcommand(){



  46. document.shuru.dos.value='Bad command or file name '



  47. }



  48. function cls(){



  49. word.style.display="none"}



  50. function helpyou(){



  51. word.style.display=""}



  52. function win(){



  53. window.open('loading.htm')



  54. }



  55. function txt(){



  56. window.open('http://go.163.com/test128/wenzhang.html')



  57. }



  58. function dhtml(){alert('正在制做中请期待......')}



  59. function search(){



  60. var dosearch=prompt("请输入你所要查询的qq号",'')



  61. var doit="http://search.tencent.com/cgi-bin/friend/user_show_info?ln="+dosearch;



  62. window.open(doit)}
  63. function searc(){
  64. var dosearch=prompt("请输入你所要查询的网页或内容",'')
  65. var doit="http://202.98.123.184/cns.dll?fw=cm2&name="+dosearch;
  66. window.open(doit)}



  67. function judge(){



  68. var menu=document.shuru.dos.value;



  69. if(menu=='exit')



  70. shutdown()



  71. else if(menu=='dir')



  72. helpyou()



  73. else if(menu=='cls')



  74. cls()



  75. else if(menu=='win')



  76. win()



  77. else if(menu=='txt')



  78. txt()



  79. else if(menu=='dhtml')



  80. dhtml()
  81. else if(menu=='dll')


  82. searc()




  83. else if(menu=='qq')



  84. search()



  85. else



  86. errorcommand()



  87. }

  88. </SCRIPT>

  89. <script language="JavaScript">

  90. <!--

  91. function MM_popupMsg(msg) { //v1.0

  92.   alert(msg);

  93. }

  94. //-->

  95. </script>



  96. <BODY onload=flash()><BR>

  97. <DIV id=""

  98. style="WIDTH: 760px; POSITION: absolute">www.haiyangtop.tk(R)&nbsp;personal&nbsp;webpage dos<BR>&nbsp;&nbsp;(C)Copyright&copy;LCX&nbsp;<script language="JavaScript1.2" src="1.js" type="text/javascript"></script>

  99. <BR><BR>

  100. <DIV id=word

  101. style="DISPLAY: none">



  102. C:\Webpages>dir&nbsp;←<br><br>我的网易主页(黑客文章、网页制做)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WIN&nbsp;&nbsp;&nbsp;    01-3-2&nbsp;&nbsp;http://haiyangtop.126.com<br>我的海阳论坛(建站资源、情感文章)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXIT&nbsp;&nbsp;&nbsp;02-1-12&nbsp;http://www.haiyang.tk<br>

  103. <br>dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;显示本网站目录

  104. &nbsp;&nbsp;<BR>win&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;进入窗口界面,网易主页有更多内容

  105. &nbsp;&nbsp;<BR>exit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;表示退出本页进入本站论坛&nbsp;&nbsp;<BR>cls&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;表示清屏关闭目录显示&nbsp;<BR>txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我的几篇发在杂志上的散文&nbsp;<BR>dhtml&nbsp;&nbsp;&nbsp;&nbsp;动态html版更酷代替网易旧版界面<BR>
  106. qq&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 表示qq好友资料搜索<BR>
  107. dll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;表示3721网址搜索<BR>

  108. </DIV>

  109. <FORM name=shuru action=javascript:judge()>C:\WWW.haiyangtop.TK><INPUT class=input

  110. onblur=flash() onfocus="this.value='';clearTimeout(zhi)" size=60

  111. value="  " name=dos title="用鼠标点后键入dir回车"> <INPUT style="DISPLAY: none" type=submit value=submit hidden>

  112. </FORM></DIV></BODY>
复制代码
 楼主| 发表于 2003-3-17 18:01:15 | 显示全部楼层
超强的时钟,cool!


  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML><HEAD>
  3. <META http-equiv=Content-Type content="text/html; charset=windows-1252">
  4. <META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
  5. <BODY>
  6. <SCRIPT language=JavaScript>
  7. dCol='000000';//date colour.
  8. fCol='000000';//face colour.
  9. sCol='000000';//seconds colour.
  10. mCol='000000';//minutes colour.
  11. hCol='000000';//hours colour.
  12. ClockHeight=40;
  13. ClockWidth=40;
  14. ClockFromMouseY=0;
  15. ClockFromMouseX=100;

  16. //Alter nothing below! Alignments will be lost!

  17. d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
  18. m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
  19. date=new Date();
  20. day=date.getDate();
  21. year=date.getYear();
  22. if (year < 2000) year=year+1900;
  23. TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
  24. D=TodaysDate.split('');
  25. H='...';
  26. H=H.split('');
  27. M='....';
  28. M=M.split('');
  29. S='.....';
  30. S=S.split('');
  31. Face='1 2 3 4 5 6 7 8 9 10 11 12';
  32. font='Arial';
  33. size=1;
  34. speed=0.6;
  35. ns=(document.layers);
  36. ie=(document.all);
  37. Face=Face.split(' ');
  38. n=Face.length;
  39. a=size*10;
  40. ymouse=0;
  41. xmouse=0;
  42. scrll=0;
  43. props="<font face="+font+" size="+size+" color="+fCol+"><B>";
  44. props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
  45. Split=360/n;
  46. Dsplit=360/D.length;
  47. HandHeight=ClockHeight/4.5
  48. HandWidth=ClockWidth/4.5
  49. HandY=-7;
  50. HandX=-2.5;
  51. scrll=0;
  52. step=0.06;
  53. currStep=0;
  54. y=new Array();x=new Array();Y=new Array();X=new Array();
  55. for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
  56. Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
  57. for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
  58. if (ns){
  59. for (i=0; i < D.length; i++)
  60. document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
  61. for (i=0; i < n; i++)
  62. document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
  63. for (i=0; i < S.length; i++)
  64. document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
  65. for (i=0; i < M.length; i++)
  66. document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
  67. for (i=0; i < H.length; i++)
  68. document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
  69. }
  70. if (ie){
  71. document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  72. for (i=0; i < D.length; i++)
  73. document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
  74. document.write('</div></div>');
  75. document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  76. for (i=0; i < n; i++)
  77. document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
  78. document.write('</div></div>');
  79. document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  80. for (i=0; i < H.length; i++)
  81. document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
  82. document.write('</div></div>');
  83. document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  84. for (i=0; i < M.length; i++)
  85. document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
  86. document.write('</div></div>')
  87. document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  88. for (i=0; i < S.length; i++)
  89. document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
  90. document.write('</div></div>')
  91. }
  92. (ns)?window.captureEvents(Event.MOUSEMOVE):0;
  93. function Mouse(evnt){
  94. ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
  95. xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
  96. }
  97. (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
  98. function ClockAndAssign(){
  99. time = new Date ();
  100. secs = time.getSeconds();
  101. sec = -1.57 + Math.PI * secs/30;
  102. mins = time.getMinutes();
  103. min = -1.57 + Math.PI * mins/30;
  104. hr = time.getHours();
  105. hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
  106. if (ie){
  107. Od.style.top=window.document.body.scrollTop;
  108. Of.style.top=window.document.body.scrollTop;
  109. Oh.style.top=window.document.body.scrollTop;
  110. Om.style.top=window.document.body.scrollTop;
  111. Os.style.top=window.document.body.scrollTop;
  112. }
  113. for (i=0; i < n; i++){
  114. var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
  115. F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
  116. F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
  117. }
  118. for (i=0; i < H.length; i++){
  119. var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
  120. HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
  121. HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
  122. }
  123. for (i=0; i < M.length; i++){
  124. var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
  125. ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
  126. ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
  127. }
  128. for (i=0; i < S.length; i++){
  129. var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
  130. SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
  131. SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
  132. }
  133. for (i=0; i < D.length; i++){
  134. var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
  135. DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
  136. DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
  137. }
  138. currStep-=step;
  139. }
  140. function Delay(){
  141. scrll=(ns)?window.pageYOffset:0;
  142. Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
  143. Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
  144. for (i=1; i < D.length; i++){
  145. Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
  146. Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
  147. }
  148. y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
  149. x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
  150. for (i=1; i < n; i++){
  151. y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
  152. x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
  153. }
  154. ClockAndAssign();
  155. setTimeout('Delay()',20);
  156. }
  157. if (ns||ie)window.onload=Delay;
  158. </SCRIPT>
  159. <BR><BR><BR><BR><BR><BR><BR><BR><BR><FONT color=blue>Hi Guys this is
  160. amazing.</FONT size=20 Color=red><BR>I do not know who wrote this HTML code.<br>Asoka Liyanage.</BODY></HTML>
复制代码
 楼主| 发表于 2003-3-17 18:02:00 | 显示全部楼层
内容滚动的表格

  1. <html>
  2. <head>
  3. <title>无标题文档</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. </head>
  6. <style>
  7. td,p,div,body,font{font-family:"宋体";font-size:9pt}
  8. </style>
  9. <body bgcolor="#FFFFFF" text="#000000">
  10. <table width=500 border=1 cellspacing=0 cellpadding=0 bgcolor=#f0f0ff bordercolordark=#ffffff bordercolorlight=#4D9AD6 class="a">
  11. <tr height=20 bgcolor=#006DAD valign=middle align=center><td colspan=3><font color=#ffffff>2002年04月供应商供货排行榜</font></td></tr>
  12. <tr height=20 bgcolor=#4D9AD6 valign=middle align=center><td width=50><font color=#f0f0f0>名次</font></td><td width=300>
  13. <marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A" align=center>
  14. <tr>
  15. <td><font color=#f0f0f0>【<font color="#FF0000">材料</font> 设备 配件 煤炭 化工 三剂】供应商名称</font></td>
  16. </tr><tr>
  17. <td><font color=#f0f0f0>【材料 <font color="#FF0000">设备</font> 配件 煤炭 化工 三剂】供应商名称</font></td>
  18. </tr>
  19. <tr>
  20. <td><font color=#f0f0f0>【材料 设备 <font color="#FF0000">配件</font> 煤炭 化工 三剂】供应商名称</font></td>
  21. </tr><tr>
  22. <td><font color=#f0f0f0>【材料 设备 配件 <font color="#FF0000">煤炭</font> 化工 三剂】供应商名称</font></td>
  23. </tr><tr>
  24. <td><font color=#f0f0f0>【材料 设备 配件 煤炭 <font color="#FF0000">化工</font> 三剂】供应商名称</font></td>
  25. </tr><tr>
  26. <td><font color=#f0f0f0>【材料 设备 配件 煤炭 化工 <font color="#FF0000">三剂</font>】供应商名称</font></td>
  27. </tr></table>
  28. </marquee></td><td width=150><font color=#f0f0f0>成交金额(万元)</font></td></tr>
  29. <tr bgcolor="#FFFFFF"><td align=center>1</td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=3000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A">
  30. <tr>
  31. <td>投放量将达160万吨</td>
  32. </tr>
  33. <tr>
  34. <td>mm石投放量将达160万吨</td>
  35. </tr>
  36. <tr>
  37. <td>mm油田投放量将达160万吨司</td>
  38. </tr>
  39. <tr>
  40. <td>mm投放量将达160万吨</td>
  41. </tr>
  42. <tr>
  43. <td>mm油田投放量将达160责司</td>
  44. </tr>
  45. <tr>
  46. <td>mm投放量将达160万吨</td>
  47. </tr>
  48. </table></marquee></td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A" align=right>
  49. <tr><td align=right> 15,570.40</td></tr>
  50. <tr><td align=right> 4,703.07</td></tr>
  51. <tr><td align=right> 682.84</td></tr>
  52. <tr><td align=right> 5,482.77</td></tr>
  53. <tr><td align=right> 3,671.14</td></tr>
  54. <tr><td align=right> 1,461.90</td></tr>
  55. </table></marquee></td></tr>
  56. <tr bgcolor="#FFFFFF"><td align=center>2</td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0>
  57. <table border=0 cellspacing=0 cellpadding=0 class="A" width="183">
  58. <tr>
  59. <td>mm钢铁投放量将达160万吨</td>
  60. </tr>
  61. <tr>
  62. <td>mm投放量将达160万吨程机械厂</td>
  63. </tr>
  64. <tr>
  65. <td>mm标投放量将达160万吨</td>
  66. </tr>
  67. <tr>
  68. <td>mm投放量将达160万吨责任公司</td>
  69. </tr>
  70. <tr>
  71. <td>mm油投放量将达160万吨司</td>
  72. </tr>
  73. <tr>
  74. <td>mm炼投放量将达160万吨剂厂</td>
  75. </tr>
  76. </table></marquee></td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A" align=right>
  77. <tr><td align=right> 12,096.92</td></tr>
  78. <tr><td align=right> 4,081.08</td></tr>
  79. <tr><td align=right> 236.80</td></tr>
  80. <tr><td align=right> 2,014.50</td></tr>
  81. <tr><td align=right> 590.65</td></tr>
  82. <tr><td align=right> 1,102.50</td></tr>
  83. </table></marquee></td></tr>
  84. <tr bgcolor="#FFFFFF"><td align=center>3</td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0>
  85. <table border=0 cellspacing=0 cellpadding=0 class="A" width="163">
  86. <tr>
  87. <td>mm钢管公司</td>
  88. </tr>
  89. <tr>
  90. <td>mm投放量将达160万吨械厂</td>
  91. </tr>
  92. <tr>
  93. <td>江头股份</td>
  94. </tr>
  95. <tr>
  96. <td>投放量将达160万吨公司</td>
  97. </tr>
  98. <tr>
  99. <td>濮阳投放量将达160万吨</td>
  100. </tr>
  101. <tr>
  102. <td>投放量将达160万吨剂厂</td>
  103. </tr>
  104. </table></marquee></td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A" align=right>
  105. <tr><td align=right> 8,316.13</td></tr>
  106. <tr><td align=right> 3,100.50</td></tr>
  107. <tr><td align=right> 161.13</td></tr>
  108. <tr><td align=right> 1,755.00</td></tr>
  109. <tr><td align=right> 401.60</td></tr>
  110. <tr><td align=right> 945.00</td></tr>
  111. </table></marquee></td></tr>
  112. <tr bgcolor="#FFFFFF"><td align=center>4</td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0>
  113. <table border=0 cellspacing=0 cellpadding=0 class="A" width="165">
  114. <tr>
  115. <td>天投放量将达160万吨</td>
  116. </tr>
  117. <tr>
  118. <td>东投放量将达160万吨司</td>
  119. </tr>
  120. <tr>
  121. <td>上海东投放量将达160万吨</td>
  122. </tr>
  123. <tr>
  124. <td>上投放量将达160万吨公司</td>
  125. </tr>
  126. <tr>
  127. <td>三投放量将达160万吨公司</td>
  128. </tr>
  129. <tr>
  130. <td>齐鲁投放量将达160万吨</td>
  131. </tr>
  132. </table></marquee></td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A" align=right>
  133. <tr><td align=right> 4,654.65</td></tr>
  134. <tr><td align=right> 1,010.40</td></tr>
  135. <tr><td align=right> 125.98</td></tr>
  136. <tr><td align=right> 1,752.00</td></tr>
  137. <tr><td align=right> 161.99</td></tr>
  138. <tr><td align=right> 827.11</td></tr>
  139. </table></marquee></td></tr>
  140. <tr bgcolor="#FFFFFF"><td align=center>5</td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0>
  141. <table border=0 cellspacing=0 cellpadding=0 class="A" width="184">
  142. <tr>
  143. <td>江苏曙投放量将达160万吨公司</td>
  144. </tr>
  145. <tr>
  146. <td>东营投放量将达160万吨司</td>
  147. </tr>
  148. <tr>
  149. <td>秦投放量将达160万吨探工具厂</td>
  150. </tr>
  151. <tr>
  152. <td>投放量将达160万吨)运销公司</td>
  153. </tr>
  154. <tr>
  155. <td>河投放量将达160万吨公司</td>
  156. </tr>
  157. <tr>
  158. <td>上投放量将达160万吨司</td>
  159. </tr>
  160. </table></marquee></td><td><marquee direction=up height=14 scrollamount=14 scrolldelay=2000 scrollleft=0 scrolltop=0><table border=0 cellspacing=0 cellpadding=0 class="A" align=right>
  161. <tr><td align=right> 3,341.80</td></tr>
  162. <tr><td align=right> 567.06</td></tr>
  163. <tr><td align=right> 104.00</td></tr>
  164. <tr><td align=right> 1,650.00</td></tr>
  165. <tr><td align=right> 68.66</td></tr>
  166. <tr><td align=right> 684.00</td></tr>
  167. </table></marquee></td></tr>
  168. </table>
  169. </body>
  170. </html>
复制代码
 楼主| 发表于 2003-3-17 18:02:36 | 显示全部楼层
抽屉式菜单


  1. <HTML>
  2. <HEAD>

  3. <TITLE>Document Title</TITLE>

  4. <!-- 你可以通过下面的样式定义来改变元件的样式 -->

  5. <style>
  6. A{color:blue; text-decoration:none}
  7. A:hover{color:red;text-decoration:underline;}
  8. A:link{text-decoration:none;}

  9. TD{font-family:宋体,helvetica; font-size:9pt}
  10. DIV.clTopMenu{position:absolute; width:97; height:150; clip:rect(0,101,14,0); visibility:hidden; z-index:31; }
  11. DIV.clTopMenuBottom{position:absolute; width:97; height:3; clip:rect(0,101,3,0); top:11; layer-background-color:#c0c000; background-color:#c0c000; z-index:2}
  12. DIV.clTopMenuText{position:absolute; width:88; left:5; top:15; font-family:宋体,helvetica; font-size:9pt; z-index:1;layer-background-color:#C8C8FF; background-color:#C8C8FF}
  13. </style>

  14. <script>

  15. ie=document.all?1:0
  16. n=document.layers?1:0


  17. /***设置变量***/
  18. var numberOfMenus=1 //这个变量是定义有几个抽屉式菜单。0代表有一个,1代表有两个(需要在<body></body>中定义不同的菜单定义)

  19. var mwidth=97 //菜单文字的宽度

  20. var pxBetween=10 //两个或多个菜单的间隔(单位:像素)

  21. var fromLeft=20 //第一个菜单的左边边距(单位:像素)

  22. var fromTop=10 //菜单的上边距(单位:像素)

  23. var bgColor='#c0c000' //当鼠标没有移入菜单头时,菜单底的颜色

  24. var bgColorChangeTo='#c0c000'//当鼠标移入菜单头时,菜单底的颜色

  25. var imageHeight=13 //菜单头的高度(单位:像素)


  26. /***下面的程序如果你不是高手,请不要更改***/

  27. //构造对象
  28. function makeNewsMenu(obj,nest){
  29.         nest=(!nest) ? '':'document.'+nest+'.'                                       
  30.         this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')        
  31.         this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')
  32.         this.moveIt=b_moveIt;this.bgChange=b_bgChange;
  33.         this.slideUp=b_slideUp; this.slideDown=b_slideDown;
  34.         this.clipTo=b_clipTo;
  35.     this.obj = obj + "Object";         eval(this.obj + "=this")               
  36. }

  37. //对像的方法
  38. function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
  39. function b_bgChange(color){if(ie) this.css.backgroundColor=color; else this.css.bgColor=color}
  40. function b_clipTo(t,r,b,l){
  41.         if(n){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l
  42.         }else this.css.clip="rect("+t+","+r+","+b+","+l+")";
  43. }
  44. function b_slideUp(ystop,moveby,speed,fn,wh){
  45.         if(!this.slideactive){
  46.                 if(this.y>ystop){
  47.                         this.moveIt(this.x,this.y-5); eval(wh)
  48.                         setTimeout(this.obj+".slideUp("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+"')",speed)
  49.                 }else{
  50.                         this.slideactive=false; this.moveIt(0,ystop); eval(fn)
  51.                 }
  52.         }
  53. }
  54. function b_slideDown(ystop,moveby,speed,fn,wh){
  55.         if(!this.slideactive){
  56.                 if(this.y<ystop){
  57.                         this.moveIt(this.x,this.y+5); eval(wh)
  58.                         setTimeout(this.obj+".slideDown("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+"')",speed)
  59.                 }else{
  60.                         this.slideactive=false; this.moveIt(0,ystop); eval(fn)
  61.                 }
  62.         }
  63. }

  64. //初始化,并建立一个跨浏览器的页
  65. function newsMenuInit(){
  66.         oTopMenu=new Array()
  67.         for(i=0;i<=numberOfMenus;i++){
  68.                 oTopMenu[i]=new Array()
  69.                 oTopMenu[i][0]=new makeNewsMenu('divTopMenu'+i)
  70.                 oTopMenu[i][1]=new makeNewsMenu('divTopMenuBottom'+i,'divTopMenu'+i)
  71.                 oTopMenu[i][2]=new makeNewsMenu('divTopMenuText'+i,'divTopMenu'+i)
  72.                 oTopMenu[i][1].moveIt(0,imageHeight)
  73.                 oTopMenu[i][0].clipTo(0,mwidth,imageHeight+3,0)
  74.                 oTopMenu[i][0].moveIt(i*mwidth+fromLeft+(i*pxBetween),fromTop)
  75.                 oTopMenu[i][0].css.visibility="visible"
  76.         }
  77. }

  78. //当点击后,移到菜单,就像抽屉一样打开菜单
  79. function topMenu(num){
  80.         if(oTopMenu[num][1].y==imageHeight) oTopMenu[num][1].slideDown(oTopMenu[num][2].scrollHeight+20,10,40,'oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')
  81.         else if(oTopMenu[num][1].y==oTopMenu[num][2].scrollHeight+20) oTopMenu[num][1].slideUp(imageHeight,10,40,'oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')
  82. }
  83. //当鼠标进入时,
  84. function menuOver(num){oTopMenu[num][1].bgChange(bgColorChangeTo)}
  85. function menuOut(num){oTopMenu[num][1].bgChange(bgColor)}


  86. //在页面载入的时候初始化菜单
  87. onload=newsMenuInit;
  88. </script>




  89. </HEAD>
  90. <BODY bgcolor=white>

  91. <!-- 第一个菜单定义 -->
  92.         <div id="divTopMenu0" class="clTopMenu"><a href="#" onmouseover="menuOver(0)" onmouseout="menuOut(0)" onclick="topMenu(0); if(ie)this.blur(); return false"><img src="tr1207-clickformenu.gif" width=97 alt="请单击以“展开/收起”菜单" border=0 align="top"></a>
  93.         <div id="divTopMenuText0" class="clTopMenuText"><center>
  94.                 <a href="#" ONMOUSEOVER="window.status='菜单项一';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项一】</a><br>
  95.                 <a href="#" ONMOUSEOVER="window.status='菜单项二';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项二】</a><br>
  96.                 <a href="#" ONMOUSEOVER="window.status='菜单项三';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项三】</a><br>
  97.                 <a href="#" ONMOUSEOVER="window.status='菜单项四';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项四】</a><br>
  98.                 <a href="#" ONMOUSEOVER="window.status='菜单项五';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项五】</a><br>
  99.                 <a href="#" ONMOUSEOVER="window.status='菜单项六';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项六】</a><br>
  100.                 <a href="http://haoel.yeah.net/" target="_blank" ONMOUSEOVER="window.status='耗子网络编程站';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【耗子编程站】</a></center>
  101.         </div>
  102.         <div id="divTopMenuBottom0" class="clTopMenuBottom"></div>
  103.         </div>

  104. <!--第一个菜单定义结束 -->

  105. <!-- 第二个菜单定义 -->
  106.         <div id="divTopMenu1" class="clTopMenu"><a href="#" onmouseover="menuOver(1)" onmouseout="menuOut(1)" onclick="topMenu(1); if(ie)this.blur(); return false"><img src="tr1207-clickformenu.gif" width=97 alt="请单击以“展开/收起”菜单" border=0 align="top"></a>
  107.         <div id="divTopMenuText1" class="clTopMenuText"><center>
  108.                 <a href="#" ONMOUSEOVER="window.status='菜单项七';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项七】</a><br>
  109.                 <a href="#" ONMOUSEOVER="window.status='菜单项八';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项八】</a><br>
  110.                 <a href="#" ONMOUSEOVER="window.status='菜单项九';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项九】</a><br>
  111.                 <a href="#" ONMOUSEOVER="window.status='菜单项十';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【菜单项十】</a><br>
  112.                 <a href="http://haoel.yeah.net/" target="_blank" ONMOUSEOVER="window.status='耗子网络编程站';return true;" ONMOUSEOUT="window.status='';return true;" onclick="window.focus()">【耗子编程站】</a></center>
  113.         </div>
  114.         <div id="divTopMenuBottom1" class="clTopMenuBottom"></div>
  115.         </div>

  116. <!--第二个菜单定义结束 -->

  117. </BODY>
  118. </HTML>
复制代码
 楼主| 发表于 2003-3-17 18:03:33 | 显示全部楼层
在ShowModeldialog中实现编辑功能



  1. <script>

  2.         var msg_win = null;

  3.         function showMessage()
  4.         {
  5. var num ='about:<textarea name="S1" style="width:100%; height:100%">Is me</textarea>'
  6.                 msg_win = window.showModelessDialog(num,"MSGMSGMSG","dialogLeft:0px;dialogTop:0px;dialogHeight:200px;dialogWidth:250px;center:yes;help:yes;resizable:yes;status:no;scroll:no");
  7.         }

  8. </script>  
  9. <button onclick=showMessage()>open</button>
复制代码
您需要登录后才可以回帖 登录 | 加入无忧

本版积分规则

小黑屋|手机版|Archiver|无忧脚本 ( 苏ICP备05080427号 )|值班电话:027-62300445   鄂公网安备 42011102000433号

GMT+8, 2017-11-18 12:47 , Processed in 0.105578 second(s), 7 queries , Gzip On, Memcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表