在b/s开发中经常用到的javaScript技术。


一、验证类
1、数字验证内
  1.1 整数
  1.2 大于0的整数 (用于传来的ID的验证)
  1.3 负整数的验证
  1.4 整数不能大于iMax
  1.5 整数不能小于iMin
2、时间类
  2.1 短时间,形如 (13:04:06)
  2.2 短日期,形如 (2003-12-05)
  2.3 长时间,形如 (2003-12-05 13:04:06)
  2.4 只有年和月。形如(2003-05,或者2003-5)
  2.5 只有小时和分钟,形如(12:03)
3、表单类
  3.1 所有的表单的值都不能为空
  3.2 多行文本框的值不能为空。
  3.3 多行文本框的值不能超过sMaxStrleng
  3.4 多行文本框的值不能少于sMixStrleng
  3.5 判断单选框是否选择。
  3.6 判断复选框是否选择.
  3.7 复选框的全选,多选,全不选,反选
  3.8 文件上传过程中判断文件类型
4、字符类
  4.1 判断字符全部由a-Z或者是A-Z的字字母组成
  4.2 判断字符由字母和数字组成。
  4.3 判断字符由字母和数字,下划线,点号组成.且开头的只能是下划线和字母
  4.4 字符串替换函数.Replace();
5、浏览器类
  5.1 判断浏览器的类型
  5.2 判断ie的版本
  5.3 判断客户端的分辨率
 
6、结合类
  6.1 email的判断。
  6.2 手机号码的验证
  6.3 身份证的验证
 

二、功能类

1、时间与相关控件类
  1.1 日历
  1.2 时间控件
  1.3 万年历
  1.4 显示动态显示时钟效果(文本,如OA中时间)
  1.5 显示动态显示时钟效果 (图像,像手表)
2、表单类
  2.1 自动生成表单
  2.2 动态添加,修改,删除下拉框中的元素
  2.3 可以输入内容的下拉框
  2.4 多行文本框中只能输入iMax文字。如果多输入了,自动减少到iMax个文字(多用于短信发送)
 
3、打印类
  3.1 打印控件
4、事件类
  4.1 屏蔽右键
  4.2 屏蔽所有功能键
  4.3 --> 和<-- F5 F11,F9,F1
  4.4 屏蔽组合键ctrl+N
5、网页设计类
  5.1 连续滚动的文字,图片(注意是连续的,两段文字和图片中没有空白出现)
  5.2 html编辑控件类
  5.3 颜色选取框控件
  5.4 下拉菜单
  5.5 两层或多层次的下拉菜单
  5.6 仿IE菜单的按钮。(效果如rongshuxa.com的导航栏目)
  5.7 状态栏,title栏的动态效果(例子很多,可以研究一下)
  5.8 双击后,网页自动滚屏
6、树型结构。
  6.1 asp+SQL版
  6.2 asp+xml+sql版
  6.3 java+sql或者java+sql+xml
7、无边框效果的制作
8、连动下拉框技术
9、文本排序
 


我做第一手
<script language="JavaScript">
<!--
function check(text){
var checkstr,iMax=5,iMin=3
checkstr="isInt:"+(parseInt(text)==text)+"/n"
checkstr+="isID:"+((parseInt(text)==text)&&(text>=0))+"/n"
checkstr+="小于"+iMax+":"+((parseInt(text)==text)&&(text<iMax))+"/n"
checkstr+="大于"+iMin+":"+((parseInt(text)==text)&&(text>iMin))+"/n"
alert(checkstr)
}
//-->
</script>
<form method=post action="">
<input type="text" id="text1" onchange="check(this.value)">
</form>


4、事件类
  4.1 屏蔽右键
      在body标签里加上oncontextmenu=self.event.returnValue=false 
  4.2 屏蔽所有功能键

  4.3 --> 和<-- F5 F11,F9,F1

  4.4 屏蔽组合键ctrl+N

<script language=javascript>
function KeyDown(){ 
  if ((window.event.altKey)&&
      ((window.event.keyCode==37)||   //屏蔽 Alt+ 方向键 ←
       (window.event.keyCode==39))){  //屏蔽 Alt+ 方向键 →
     alert("不准你使用ALT+方向键前进或后退网页!");
     event.returnValue=false;
     }
  if ((event.keyCode==8)||            //屏蔽退格删除键
      (event.keyCode==116)){          //屏蔽 F5 刷新键
     event.keyCode=0;
     event.returnValue=false;
     }
  if ((event.ctrlKey)&&(event.keyCode==78)){   //屏蔽 Ctrl+n
     event.returnValue=false;
     }
  if ((event.shiftKey)&&(event.keyCode==121)){ //屏蔽 shift+F10
     event.returnValue=false;
     }
  if (event.keyCode==122){ //屏蔽 F11
     event.returnValue=false;
     }
  }
只要知道keyCode即可屏蔽所有功能键


4、事件类
  4.1 屏蔽右键
      在body标签里加上oncontextmenu=self.event.returnValue=false 
  4.2 屏蔽所有功能键

  4.3 --> 和<-- F5 F11,F9,F1

  4.4 屏蔽组合键ctrl+N

<script language=javascript>
function KeyDown(){ 
  if ((window.event.altKey)&&
      ((window.event.keyCode==37)||   //屏蔽 Alt+ 方向键 ←
       (window.event.keyCode==39))){  //屏蔽 Alt+ 方向键 →
     alert("不准你使用ALT+方向键前进或后退网页!");
     event.returnValue=false;
     }
  if ((event.keyCode==8)||            //屏蔽退格删除键
      (event.keyCode==116)){          //屏蔽 F5 刷新键
     event.keyCode=0;
     event.returnValue=false;
     }
  if ((event.ctrlKey)&&(event.keyCode==78)){   //屏蔽 Ctrl+n
     event.returnValue=false;
     }
  if ((event.shiftKey)&&(event.keyCode==121)){ //屏蔽 shift+F10
     event.returnValue=false;
     }
  if (event.keyCode==122){ //屏蔽 F11
     event.returnValue=false;
     }
  }
只要知道keyCode即可屏蔽所有功能键


一、验证类
1、数字验证内
  1.1 整数
      /^(-|/+)?/d+$/.test(str)
  1.2 大于0的整数 (用于传来的ID的验证)
      /^/d+$/.test(str)
  1.3 负整数的验证
      /^-/d+$/.test(str)
2、时间类
  2.1 短时间,形如 (13:04:06)
      function isTime(str)
      {
        var a = str.match(/^(/d{1,2})(:)?(/d{1,2})/2(/d{1,2})$/);
        if (a == null) {alert('输入的参数不是时间格式'); return false;}
        if (a[1]>24 || a[3]>60 || a[4]>60)
        {
          alert("时间格式不对");
          return false
        }
        return true;
      }
  2.2 短日期,形如 (2003-12-05)
      function strDateTime(str)
      {
         var r = str.match(/^(/d{1,4})(-|//)(/d{1,2})/2(/d{1,2})$/);
         if(r==null)return false;
         var d= new Date(r[1], r[3]-1, r[4]);
         return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);
      }
  2.3 长时间,形如 (2003-12-05 13:04:06)
      function strDateTime(str)
      {
        var reg = /^(/d{1,4})(-|//)(/d{1,2})/2(/d{1,2}) (/d{1,2}):(/d{1,2}):(/d{1,2})$/;
        var r = str.match(reg);
        if(r==null)return false;
        var d= new Date(r[1], r[3]-1,r[4],r[5],r[6],r[7]);
        return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7]);
      }
  2.4 只有年和月。形如(2003-05,或者2003-5)
  2.5 只有小时和分钟,形如(12:03)
3、表单类
  3.1 所有的表单的值都不能为空
      <input onblur="if(this.value.replace(/^/s+|/s+$/g,'')=='')alert('不能为空!')">
  3.2 多行文本框的值不能为空。
  3.3 多行文本框的值不能超过sMaxStrleng
  3.4 多行文本框的值不能少于sMixStrleng
  3.5 判断单选框是否选择。
  3.6 判断复选框是否选择.
  3.7 复选框的全选,多选,全不选,反选
  3.8 文件上传过程中判断文件类型
4、字符类
  4.1 判断字符全部由a-Z或者是A-Z的字字母组成
      <input onblur="if(/[^a-zA-Z]/g.test(this.value))alert('有错')">
  4.2 判断字符由字母和数字组成。
      <input onblur="if(/[^0-9a-zA-Z]/g.test(this.value))alert('有错')">
  4.3 判断字符由字母和数字,下划线,点号组成.且开头的只能是下划线和字母
      /^([a-zA-z_]{1})([/w]*)$/g.test(str)
  4.4 字符串替换函数.Replace();
5、浏览器类
  5.1 判断浏览器的类型
      window.navigator.appName
  5.2 判断ie的版本
      window.navigator.appVersion
  5.3 判断客户端的分辨率
      window.screen.height;  window.screen.width;
 
6、结合类
  6.1 email的判断。
      function ismail(mail)
      {
        return(new RegExp(/^/w+((-/w+)|(/./w+))*/@[A-Za-z0-9]+((/.|-)[A-Za-z0-9]+)*/.[A-Za-z0-9]+$/).test(mail));
      }
  6.2 手机号码的验证
  6.3 身份证的验证
      function isIdCardNo(num)
      {
        if (isNaN(num)) {alert("输入的不是数字!"); return false;}
        var len = num.length, re;
        if (len == 15)
          re = new RegExp(/^(/d{6})()?(/d{2})(/d{2})(/d{2})(/d{3})$/);
        else if (len == 18)
          re = new RegExp(/^(/d{6})()?(/d{4})(/d{2})(/d{2})(/d{3})(/d)$/);
        else {alert("输入的数字位数不对!"); return false;}
        var a = num.match(re);
        if (a != null)
        {
          if (len==15)
          {
            var D = new Date("19"+a[3]+"/"+a[4]+"/"+a[5]);
            var B = D.getYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5];
          }
          else
          {
            var D = new Date(a[3]+"/"+a[4]+"/"+a[5]);
            var B = D.getFullYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5];
          }
          if (!B) {alert("输入的身份证号 "+ a[0] +" 里出生日期不对!"); return false;}
        }
        return true;
      }


一、验证类
1、数字验证内
  1.1 整数
      /^(-|/+)?/d+$/.test(str)
  1.2 大于0的整数 (用于传来的ID的验证)
      /^/d+$/.test(str)
  1.3 负整数的验证
      /^-/d+$/.test(str)
2、时间类
  2.1 短时间,形如 (13:04:06)
      function isTime(str)
      {
        var a = str.match(/^(/d{1,2})(:)?(/d{1,2})/2(/d{1,2})$/);
        if (a == null) {alert('输入的参数不是时间格式'); return false;}
        if (a[1]>24 || a[3]>60 || a[4]>60)
        {
          alert("时间格式不对");
          return false
        }
        return true;
      }
  2.2 短日期,形如 (2003-12-05)
      function strDateTime(str)
      {
         var r = str.match(/^(/d{1,4})(-|//)(/d{1,2})/2(/d{1,2})$/);
         if(r==null)return false;
         var d= new Date(r[1], r[3]-1, r[4]);
         return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);
      }
  2.3 长时间,形如 (2003-12-05 13:04:06)
      function strDateTime(str)
      {
        var reg = /^(/d{1,4})(-|//)(/d{1,2})/2(/d{1,2}) (/d{1,2}):(/d{1,2}):(/d{1,2})$/;
        var r = str.match(reg);
        if(r==null)return false;
        var d= new Date(r[1], r[3]-1,r[4],r[5],r[6],r[7]);
        return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7]);
      }
  2.4 只有年和月。形如(2003-05,或者2003-5)
  2.5 只有小时和分钟,形如(12:03)
3、表单类
  3.1 所有的表单的值都不能为空
      <input onblur="if(this.value.replace(/^/s+|/s+$/g,'')=='')alert('不能为空!')">
  3.2 多行文本框的值不能为空。
  3.3 多行文本框的值不能超过sMaxStrleng
  3.4 多行文本框的值不能少于sMixStrleng
  3.5 判断单选框是否选择。
  3.6 判断复选框是否选择.
  3.7 复选框的全选,多选,全不选,反选
  3.8 文件上传过程中判断文件类型
4、字符类
  4.1 判断字符全部由a-Z或者是A-Z的字字母组成
      <input onblur="if(/[^a-zA-Z]/g.test(this.value))alert('有错')">
  4.2 判断字符由字母和数字组成。
      <input onblur="if(/[^0-9a-zA-Z]/g.test(this.value))alert('有错')">
  4.3 判断字符由字母和数字,下划线,点号组成.且开头的只能是下划线和字母
      /^([a-zA-z_]{1})([/w]*)$/g.test(str)
  4.4 字符串替换函数.Replace();
5、浏览器类
  5.1 判断浏览器的类型
      window.navigator.appName
  5.2 判断ie的版本
      window.navigator.appVersion
  5.3 判断客户端的分辨率
      window.screen.height;  window.screen.width;
 
6、结合类
  6.1 email的判断。
      function ismail(mail)
      {
        return(new RegExp(/^/w+((-/w+)|(/./w+))*/@[A-Za-z0-9]+((/.|-)[A-Za-z0-9]+)*/.[A-Za-z0-9]+$/).test(mail));
      }
  6.2 手机号码的验证
  6.3 身份证的验证
      function isIdCardNo(num)
      {
        if (isNaN(num)) {alert("输入的不是数字!"); return false;}
        var len = num.length, re;
        if (len == 15)
          re = new RegExp(/^(/d{6})()?(/d{2})(/d{2})(/d{2})(/d{3})$/);
        else if (len == 18)
          re = new RegExp(/^(/d{6})()?(/d{4})(/d{2})(/d{2})(/d{3})(/d)$/);
        else {alert("输入的数字位数不对!"); return false;}
        var a = num.match(re);
        if (a != null)
        {
          if (len==15)
          {
            var D = new Date("19"+a[3]+"/"+a[4]+"/"+a[5]);
            var B = D.getYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5];
          }
          else
          {
            var D = new Date(a[3]+"/"+a[4]+"/"+a[5]);
            var B = D.getFullYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5];
          }
          if (!B) {alert("输入的身份证号 "+ a[0] +" 里出生日期不对!"); return false;}
        }
        return true;
      }


3.7 复选框的全选,多选,全不选,反选
<form name=hrong>
<input type=checkbox name=All onclick="checkAll('mm')">全选<br/>
<input type=checkbox name=mm onclick="checkItem('All')"><br/>
<input type=checkbox name=mm onclick="checkItem('All')"><br/>
<input type=checkbox name=mm onclick="checkItem('All')"><br/>
<input type=checkbox name=mm onclick="checkItem('All')"><br/>
<input type=checkbox name=mm onclick="checkItem('All')"><br/><br/>


<input type=checkbox name=All2 onclick="checkAll('mm2')">全选<br/>
<input type=checkbox name=mm2 onclick="checkItem('All2')"><br/>
<input type=checkbox name=mm2 onclick="checkItem('All2')"><br/>
<input type=checkbox name=mm2 onclick="checkItem('All2')"><br/>
<input type=checkbox name=mm2 onclick="checkItem('All2')"><br/>
<input type=checkbox name=mm2 onclick="checkItem('All2')"><br/>

</form>

<SCRIPT LANGUAGE="JavaScript">
function checkAll(str)
{
  var a = document.getElementsByName(str);
  var n = a.length;
  for (var i=0; i<n; i++)
  a[i].checked = window.event.srcElement.checked;
}
function checkItem(str)
{
  var e = window.event.srcElement;
  var all = eval("document.hrong."+ str);
  if (e.checked)
  {
    var a = document.getElementsByName(e.name);
    all.checked = true;
    for (var i=0; i<a.length; i++)
    {
      if (!a[i].checked){ all.checked = false; break;}
    }
  }
  else all.checked = false;
}
</SCRIPT>

3.8 文件上传过程中判断文件类型
<input type=file onchange="alert(this.value.match(/^(.*)(/.)(.{1,8})$/)[3])">


画图:
<OBJECT
id=S
style="LEFT: 0px; WIDTH: 392px; TOP: 0px; HEIGHT: 240px"
height=240
width=392
classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6">
</OBJECT>
<SCRIPT>
S.DrawingSurface.ArcDegrees(0,0,0,30,50,60);
S.DrawingSurface.ArcRadians(30,0,0,30,50,60);
S.DrawingSurface.Line(10,10,100,100);
</SCRIPT>


写注册表:
<SCRIPT>
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.RegWrite ("HKCU//Software//ACME//FortuneTeller//", 1, "REG_BINARY");
WshShell.RegWrite ("HKCU//Software//ACME//FortuneTeller//MindReader", "Goocher!", "REG_SZ");
var bKey =    WshShell.RegRead ("HKCU//Software//ACME//FortuneTeller//");
WScript.Echo (WshShell.RegRead ("HKCU//Software//ACME//FortuneTeller//MindReader"));
WshShell.RegDelete ("HKCU//Software//ACME//FortuneTeller//MindReader");
WshShell.RegDelete ("HKCU//Software//ACME//FortuneTeller//");
WshShell.RegDelete ("HKCU//Software//ACME//");
</SCRIPT>


TABLAE相关(客户端动态增加行列)
<HTML>
<SCRIPT LANGUAGE="JScript">
function numberCells() {
    var count=0;
    for (i=0; i < document.all.mytable.rows.length; i++) {
        for (j=0; j < document.all.mytable.rows(i).cells.length; j++) {
            document.all.mytable.rows(i).cells(j).innerText = count;
            count++;
        }
    }
}
</SCRIPT>
<BODY onload="numberCells()">
<TABLE id=mytable border=1>
<TR><TH>&nbsp;</TH><TH>&nbsp;</TH><TH>&nbsp;</TH><TH>&nbsp;</TH></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
</TABLE>
</BODY>
</HTML>



呵呵,黄蓉也来了,我也来补充一个.
1.身份证严格验证:

<script>
var aCity={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"}
 
function cidInfo(sId){
 var iSum=0
 var info=""
 if(!/^/d{17}(/d|x)$/i.test(sId))return false;
 sId=sId.replace(/x$/i,"a");
 if(aCity[parseInt(sId.substr(0,2))]==null)return "Error:非法地区";
 sBirthday=sId.substr(6,4)+"-"+Number(sId.substr(10,2))+"-"+Number(sId.substr(12,2));
 var d=new Date(sBirthday.replace(/-/g,"/"))
 if(sBirthday!=(d.getFullYear()+"-"+ (d.getMonth()+1) + "-" + d.getDate()))return "Error:非法生日";
 for(var i = 17;i>=0;i --) iSum += (Math.pow(2,i) % 11) * parseInt(sId.charAt(17 - i),11)
 if(iSum%11!=1)return "Error:非法证号";
 return aCity[parseInt(sId.substr(0,2))]+","+sBirthday+","+(sId.substr(16,1)%2?"男":"女")
}

document.write(cidInfo("380524198002300016"),"<br/>");
document.write(cidInfo("340524198002300019"),"<br/>")
document.write(cidInfo("340524197711111111"),"<br/>")
document.write(cidInfo("34052419800101001x"),"<br/>");
</script>

2.验证IP地址
<SCRIPT LANGUAGE="JavaScript">
function isip(s){
 var check=function(v){try{return (v<=255 && v>=0)}catch(x){return false}};
 var re=s.split(".")
 return (re.length==4)?(check(re[0]) && check(re[1]) && check(re[2]) && check(re[3])):false
}

var s="202.197.78.129";
alert(isip(s))
</SCRIPT>

3.加sp1后还能用的无边框窗口!!
<HTML XMLNS:IE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<IE:Download ID="include" STYLE="behavior:url(#default#download)" />
<title>Chromeless Window</title>

<SCRIPT LANGUAGE="JScript">
/*--- Special Thanks For andot ---*/

/*
 This following code are designed and writen by Windy_sk <seasonx@163.net>
 You can use it freely, but u must held all the copyright items!
*/

/*--- Thanks For andot Again ---*/

var CW_width = 400;
var CW_height = 300;
var CW_top = 100;
var CW_left = 100;
var CW_url = "/";
var New_CW = window.createPopup();
var CW_Body = New_CW.document.body;
var content = "";
var CSStext = "margin:1px;color:black; border:2px outset;border-style:expression(onmouseout=onmouseup=function(){this.style.borderStyle='outset'}, onmousedown=function(){if(event.button!=2)this.style.borderStyle='inset'});background-color:buttonface;width:16px;height:14px;font-size:12px;line-height:11px;cursor:Default;";

//Build Window
include.startDownload(CW_url, function(source){content=source});

function insert_content(){
 var temp = "";
 CW_Body.style.overflow  = "hidden";
 CW_Body.style.backgroundColor = "white";
 CW_Body.style.border  =  "solid black 1px";
 content = content.replace(/<a ([^>]*)>/g,"<a onclick='parent.open(this.href);return false' $1>");
 temp += "<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>";
 temp += "<tr style=';font-size:12px;background:#0099CC;height:20;cursor:default' ondblclick=/"Max.innerText=Max.innerText=='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();/" onmouseup='parent.drag_up(event)' onmousemove='parent.drag_move(event)' onmousedown='parent.drag_down(event)' onselectstart='return false' oncontextmenu='return false'>";
 temp += "<td style='color:#ffffff;padding-left:5px'>Chromeless Window For IE6 SP1</td>";
 temp += "<td style='color:#ffffff;padding-right:5px;' align=right>";
 temp += "<span id=Help  onclick=/"alert('Chromeless Window For IE6 SP1  -  Ver 1.0//n//nCode By Windy_sk//n//nSpecial Thanks For andot')/" style=/""+CSStext+"font-family:System;padding-right:2px;/">?</span>";
 temp += "<span id=Min   onclick='parent.New_CW.hide();parent.blur()' style=/""+CSStext+"font-family:Webdings;/" title='Minimum'>0</span>";
 temp += "<span id=Max   onclick=/"this.innerText=this.innerText=='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();/" style=/""+CSStext+"font-family:Webdings;/" title='Maximum'>1</span>";
 temp += "<span id=Close onclick='parent.opener=null;parent.close()' style=/""+CSStext+"font-family:System;padding-right:2px;/" title='Close'>x</span>";
 temp += "</td></tr><tr><td colspan=2>";
 temp += "<div id=include style='overflow:scroll;overflow-x:hidden;overflow-y:auto; HEIGHT: 100%; width:"+CW_width+"'>";
 temp += content;
 temp += "</div>";
 temp += "</td></tr></table>";
 CW_Body.innerHTML = temp;
}

setTimeout("insert_content()",1000);

var if_max = true;
function show_CW(){
 window.moveTo(10000, 10000);
 if(if_max){
  New_CW.show(CW_top, CW_left, CW_width, CW_height);
  if(typeof(New_CW.document.all.include)!="undefined"){
   New_CW.document.all.include.style.width = CW_width;
   New_CW.document.all.Max.innerText = "1";
  }
  
 }else{
  New_CW.show(0, 0, screen.width, screen.height);
  New_CW.document.all.include.style.width = screen.width;
 }
}

window.onfocus  = show_CW;
window.onresize = show_CW;

// Move Window
var drag_x,drag_y,draging=false

function drag_move(e){
 if (draging){
  New_CW.show(e.screenX-drag_x, e.screenY-drag_y, CW_width, CW_height);
  return false;
 }
}

function drag_down(e){
 if(e.button==2)return;
 if(New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height)return;
 drag_x=e.clientX;
 drag_y=e.clientY;
 draging=true;
 e.srcElement.setCapture();
}

function drag_up(e){
 draging=false;
 e.srcElement.releaseCapture();
 if(New_CW.document.body.offsetWidth==screen.width && New_CW.document.body.offsetHeight==screen.height) return;
 CW_top  = e.screenX-drag_x;
 CW_left = e.screenY-drag_y;
}

</SCRIPT>
</HTML>



偶也来..

电话号码的验证

要求:
  (1)电话号码由数字、"("、")"和"-"构成
  (2)电话号码为3到8位
  (3)如果电话号码中包含有区号,那么区号为三位或四位
  (4)区号用"("、")"或"-"和其他部分隔开
  (5)移动电话号码为11或12位,如果为12位,那么第一位为0
  (6)11位移动电话号码的第一位和第二位为"13"
  (7)12位移动电话号码的第二位和第三位为"13"
  根据这几条规则,可以与出以下正则表达式:
  (^[0-9]{3,4}/-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^/([0-9]{3,4}/)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)


<script language="javascript">
function PhoneCheck(s) {
var str=s;
var reg=/(^[0-9]{3,4}/-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^/([0-9]{3,4}/)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/
alert(reg.test(str));
}
</script>
<input type=text name="iphone">
<input type=button onclick="PhoneCheck(document.all.iphone.value)" value="Check">


具有在输入非数字字符不回显的效果,即对非数字字符的输入不作反应。
function numbersonly(field,event){
 var key,keychar;
 if(window.event){
  key = window.event.keyCode;
 }
 else if (event){
  key = event.which;
 }
 else{
  return true
 }
 keychar = String.fromCharCode(key);
 if((key == null)||(key == 0)||(key == 8)||(key == 9)||(key == 13)||(key == 27)){
  return true;
 }
 else if(("0123456789.").indexOf(keychar)>-1){
  window.status = "";
  return true;
 }
 else {
  window.status = "Field excepts numbers only";
  return false;
 }
}


在每个文本框的onblur事件中调用校验代码,并且每个文本框中onKeyDown事件中写一个enter转tab函数

//回车键换为tab
function enterToTab()
{
    if(event.srcElement.type != 'button' && event.srcElement.type != 'textarea'
       && event.keyCode == 13)
    {
        event.keyCode = 9;
    }
}


<!--to supercalvin(calvin): 普通按钮,文字,图片提交表单实例-->
<!--========================================================-->

<HTML>
<HEAD>
<TITLE> 表单提交 </TITLE>

<SCRIPT LANGUAGE = JavaScript>

function subForm()
{
 document.forms[0].action="a.jsp";
 document.forms[0].submit();
}

</SCRIPT>
</HEAD>
<BODY BGCOLOR="white">
<form action="a.jsp">
<input type="submit" value="submit">
<input type="button" onclick="subForm();" value=" 提交 " style="cursor:hand">
<a href="javascript:subForm();">提交</a>
<img src="a.jpg" onclick="subForm();" alt="图片链接" style="cursor:hand"/>
</form>
</BODY>
</HTML>

<!--========================================================-->


//======================================浏览器类=============================
//浏览器版本检测
//获取浏览器的名字Netscape或者Microsoft Internet Explorer
var  browserName=navigator.appName;
//获取浏览器的版本信息
var  browserVersion=parseInt(navigator.appVersion);
var browser;
if(browserName=="Netscape"&&browserVersion==5){
 browser="nn6";       //netspace6
}
else if(browserName="Netscape"&&browserVersion==4){
 browser="nn4";      //netspace4
}
else if(browserName="Microsoft Internet Explorer"&&
        browserVersion==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){
 browser="ie6";      //IE 6.0
}
else if(browserName="Microsoft Internet Explorer"&&
        browserVersion==4&&
  navigator.appVersion.indexOf("MSIE 5.5")!=-1){
 browser="ie55";     //IE5.5
}
else if(browserName="Microsoft Internet Explorer"&&
        browserVersion==4&&
  navigator.appVersion.indexOf("MSIE 5.0")!=-1){
 browser="ie5";       //IE5.0
}
else if(browserName="Microsoft Internet Explorer"&&
        browserVersion==4){
 browser="ie4";       //IE4
}

/*
if(browser=="nn6"||browser=="ie6"||browser=="ie55"||browser="ie5"){
 //不与高版本要求的代码
}else if(browser=="ie4"){
 //不兼容nn4的代码
}else if(browser=="nn4"){
 //不兼容ie4的代码
}
*/

/* *********************************end browser **************************** */

//判断操作平台是不是win98
function isWin98(){
 if(navigator.appVersion.indexOf("98")!=-1){
  return true;
 }else{
  //alert("你使用不是windows98操作系统");
  return false;
 }
}

//分辨率的检测
function redirectPage(){
 //分辨率初始化
 var size;
 if(screen.width==640&&screen.height==480)
   return size="640 x 480";
 if(screen.width==800&&screen.height==600)
   return size="800 x 600";
 if(screen.width==1024&&screen.height==768)
  return size="1024 x 768";
 else
  return size="640 x 480";
}

//  /////////////////////////结束浏览器类///////////////////////////////////////


终于可以再继续了。。。。。。。。。。因为昨天连续回了三贴没人顶。。。。被迫无法发出来。。。。。。。。。。。。当看看到这个贴子时。。。我激动得心情好是紧张。。。。。因渴望高手们的指引点化。。。。。。。。
因为。。。。我没有工作过。。。。即便兼职也没做过。。。。。所就说没经验。。。希望大家指点。。。。。。name:blapho(尿不湿) QQ:50707640 Email:noujie@sina.com  java/jsp

//=================================字符串类===============================
//禁止全角
function isQj(elem){
  //[/u4E00-/u9FA5]汉字﹐[/uFE30-/uFFA0]全角字符
  var pattern=/[/uFE30-/uFFA0]/gi;
  if(pattern.test(elem)){
    //不为汉字
 //alert("不能用全角");
 //elem="";
 return false;
  }else{
    //输入正常
    return true;
  }
}
//含有非法字符~!@%^&*();'/"?><[]{}//|,:/=+—“”‘
function havegg(elem){
  var str = "~!@%^&*();'/"?><[]{}//|,:/=+—“”‘";
  for(i=0;i<elem.length;i++)
   if (str.indexOf(elem.charAt(i)) !=-1){
          return false;
 }
     return true;
}
//由a-z和A-Z组成的字符串
function isStr(elem){
 var pattern=/^[a-zA-Z]+$/;
 if(pattern.test(elem)){
  return true;
 }else{
  return false;
 }
}
//由字符串和数字字符串组成
function isStrAndInt(elem){
    var patten=/^[a-zA-Z0-9]+$/;
 if(pattern.test(elem)){
  return true;
 }else{
  return false;
 }
}
//判断字符由字母和数字,下划线,点号组成.且开头的只能是下划线和字母
function isStrin(elem){
  var pattern=/^(/b[a-zA-Z]|/b_)([a-zA-Z0-9]+(_|/.)?[a-zA-Z0-9]*)+$/;
  if(pattern.test(elem)){
    return true;
  }else{
    return false;
  }
}
//  ////////////////////////字符串完毕/////////////////////////////////////////

//============================数字类=========================================
//邮政编码
//要求:无地区规律,但都是6位数字,最大值为(西藏拉萨850000),最小值为(呼和浩特010000)
function isPost(elem){
  var pattern=/^[0-9]{6}$/;
  if(!pattern.test(elem)){
    return false;
  }else{
    if(parseInt(elem)<10000||parseInt(elem)>850000){
   return false;
   }
   return true;
  }
}
//整数(可以带正负符号或者不带符号表正数)
function isInt(elem){
 var pattern=/^(/-|+)?/d+$/;
 if(!pattern.test(elem)){
  return false;
 }else{
  return true;
 }
}
//负数
function isNegative(elem){
 var pattern=/^/b/-d+$/;
 if(!pattern.test(elem)){
  return false;
 }else{
  return true;
 }
}
//数字字符
function isFigStr(elem){
 var pattern=/^/d+$/;
 if(!pattern.test(elem)){
  return false;
 }else{
  return true;
 }
}
//不大于imax,不小于imix的整数
function isScopeInt(elem){
 var imax=80000;
 var imix=100;
 //判断elem是否为整数,向上参考
 if(isInt(elem)==false){
  //alert("elem不是整数");
  return false;
 }
 if(parseInt(elem)>imax){
  return false;
 }
 if(parseInt(elem)<imix){
  return false;
 }
 return true;
}
// //////////////////////////////////数据类结束////////////////////////////////


右键级联菜单
<script language="JScript">

  <!--

  function RightMenu()

  {

    this.AddExtendMenu=AddExtendMenu;

    this.AddItem=AddItem;

    this.GetMenu=GetMenu;

    this.HideAll=HideAll;

    this.I_OnMouseOver=I_OnMouseOver;

    this.I_OnMouseOut=I_OnMouseOut;

    this.I_OnMouseUp=I_OnMouseUp;

    this.P_OnMouseOver=P_OnMouseOver;

    this.P_OnMouseOut=P_OnMouseOut;

    A_rbpm = new Array();

    HTMLstr  = "";

    HTMLstr += "<!-- RightButton PopMenu -->/n";

    HTMLstr += "/n";

    HTMLstr += "<!-- PopMenu Starts -->/n";

    HTMLstr += "<div id='E_rbpm' class='rm_div'>/n";

                        // rbpm = right button pop menu

    HTMLstr += "<table width='100%' border='0' cellspacing='0'>/n";

    HTMLstr += "<!-- Insert A Extend Menu or Item On Here For E_rbpm -->/n";

    HTMLstr += "</table>/n";

    HTMLstr += "</div>/n";

    HTMLstr += "<!-- Insert A Extend_Menu Area on Here For E_rbpm -->";

    HTMLstr += "/n";

    HTMLstr += "<!-- PopMenu Ends -->/n";

  }

  function AddExtendMenu(id,name,parent)

  {

    var TempStr = "";

    if(HTMLstr.indexOf("<!-- Extend Menu Area : E_"+id+" -->") != -1)

    {

      alert("E_"+id+"already exist!");

      return;

    }

    eval("A_"+parent+".length++");

    eval("A_"+parent+"[A_"+parent+".length-1] = id");  // 将此项注册到父菜单项的ID数组中去

    TempStr += "<!-- Extend Menu Area : E_"+id+" -->/n";

    TempStr += "<div id='E_"+id+"' class='rm_div'>/n";

    TempStr += "<table width='100%' border='0' cellspacing='0'>/n";

    TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+id+" -->";

    TempStr += "</table>/n";

    TempStr += "</div>/n";

    TempStr += "<!-- Insert A Extend_Menu Area on Here For E_"+id+" -->";

    TempStr += "<!-- Insert A Extend_Menu Area on Here For E_"+parent+" -->";

    HTMLstr = HTMLstr.replace("<!-- Insert A Extend_Menu Area on Here For E_"+parent+" -->",TempStr);

   

    eval("A_"+id+" = new Array()");

    TempStr  = "";

    TempStr += "<!-- Extend Item : P_"+id+" -->/n";

    TempStr += "<tr id='P_"+id+"' class='out'";

    TempStr += " onmouseover='P_OnMouseOver(/""+id+"/",/""+parent+"/")'";

    TempStr += " onmouseout='P_OnMouseOut(/""+id+"/",/""+parent+"/")'";

    TempStr += " onmouseup=window.event.cancelBubble=true;";

    TempStr += " onclick=window.event.cancelBubble=true;";

    TempStr += "><td nowrap>";

    TempStr += "   "+name+"      </td><td style='font-family: webdings; text-align: right;'>4";

    TempStr += "</td></tr>/n";

    TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->";

    HTMLstr = HTMLstr.replace("<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->",TempStr);

  }

>


右键级联菜单2
function AddItem(id,name,parent,location)

  {

    var TempStr = "";

    var ItemStr = "<!-- ITEM : I_"+id+" -->";

    if(id == "sperator")

    {

      TempStr += ItemStr+"/n";

      TempStr += "<tr style='height: 3;' class='out' onclick='window.event.cancelBubble=true;' onmouseup='window.event.cancelBubble=true;'><td colspan='2'><hr class='sperator'></td></tr>";

      TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->";

      HTMLstr = HTMLstr.replace("<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->",TempStr);

      return;

    }

    if(HTMLstr.indexOf(ItemStr) != -1)

    {

      alert("I_"+id+"already exist!");

      return;

    }

    TempStr += ItemStr+"/n";

    TempStr += "<tr id='I_"+id+"' class='out'";

    TempStr += " onmouseover='I_OnMouseOver(/""+id+"/",/""+parent+"/")'";

    TempStr += " onmouseout='I_OnMouseOut(/""+id+"/")'";

    TempStr += " onclick='window.event.cancelBubble=true;'";

    if(location == null)

      TempStr += " onmouseup='I_OnMouseUp(/""+id+"/",/""+parent+"/",null)'";

    else

      TempStr += " onmouseup='I_OnMouseUp(/""+id+"/",/""+parent+"/",/""+location+"/")'";

    TempStr += "><td nowrap>";

    TempStr += "   "+name+"   ";

    TempStr += "</td><td></td></tr>/n";

    TempStr += "<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->";

    HTMLstr = HTMLstr.replace("<!-- Insert A Extend Menu or Item On Here For E_"+parent+" -->",TempStr);

  }

  function GetMenu()

  {

    return HTMLstr;

  }

  function I_OnMouseOver(id,parent)

  {

    var Item;

    if(parent != "rbpm")

    {

      var ParentItem;

      ParentItem = eval("P_"+parent);

      ParentItem.className="over";

    }

    Item = eval("I_"+id);

    Item.className="over";

    HideAll(parent,1);

  }

  function I_OnMouseOut(id)

  {

    var Item;

    Item = eval("I_"+id);

    Item.className="out";

  }

  function I_OnMouseUp(id,parent,location)

  {

    var ParentMenu;

    window.event.cancelBubble=true;

    OnClick();

    ParentMenu = eval("E_"+parent);

    ParentMenu.display="none";

    if(location == null)

      eval("Do_"+id+"()");

    else

      window.open(location);

  }

  function P_OnMouseOver(id,parent)

  {

    var Item;

    var Extend;

    var Parent;

    if(parent != "rbpm")

    {

      var ParentItem;

      ParentItem = eval("P_"+parent);

      ParentItem.className="over";

    }

    HideAll(parent,1);

    Item = eval("P_"+id);

    Extend = eval("E_"+id);

    Parent = eval("E_"+parent);

    Item.className="over";

    Extend.style.display="block";

    Extend.style.posLeft=document.body.scrollLeft+Parent.offsetLeft+Parent.offsetWidth-4;

    if(Extend.style.posLeft+Extend.offsetWidth > document.body.scrollLeft+document.body.clientWidth)

        Extend.style.posLeft=Extend.style.posLeft-Parent.offsetWidth-Extend.offsetWidth+8;

    if(Extend.style.posLeft < 0) Extend.style.posLeft=document.body.scrollLeft+Parent.offsetLeft+Parent.offsetWidth;

    Extend.style.posTop=Parent.offsetTop+Item.offsetTop;

    if(Extend.style.posTop+Extend.offsetHeight > document.body.scrollTop+document.body.clientHeight)

      Extend.style.posTop=document.body.scrollTop+document.body.clientHeight-Extend.offsetHeight;

    if(Extend.style.posTop < 0) Extend.style.posTop=0;

  }

  function P_OnMouseOut(id,parent)

  {

  }

  function HideAll(id,flag)

  {

    var Area;

    var Temp;

    var i;

    if(!flag)

    {

      Temp = eval("E_"+id);

      Temp.style.display="none";

    }

    Area = eval("A_"+id);

    if(Area.length)

    {

      for(i=0; i < Area.length; i++)

      {

        HideAll(Area[i],0);

        Temp = eval("E_"+Area[i]);

        Temp.style.display="none";

        Temp = eval("P_"+Area[i]);

        Temp.className="out";

      }

    }

  }

  document.onmouseup=OnMouseUp;

  document.onclick=OnClick;

  function OnMouseUp()

  {

    if(window.event.button == 2)

    {

      var PopMenu;

      PopMenu = eval("E_rbpm");

      HideAll("rbpm",0);

      PopMenu.style.display="block";

      PopMenu.style.posLeft=document.body.scrollLeft+window.event.clientX;

      PopMenu.style.posTop=document.body.scrollTop+window.event.clientY;

      if(PopMenu.style.posLeft+PopMenu.offsetWidth > document.body.scrollLeft+document.body.clientWidth)

        PopMenu.style.posLeft=document.body.scrollLeft+document.body.clientWidth-PopMenu.offsetWidth;

      if(PopMenu.style.posLeft < 0) PopMenu.style.posLeft=0;

      if(PopMenu.style.posTop+PopMenu.offsetHeight > document.body.scrollTop+document.body.clientHeight)

        PopMenu.style.posTop=document.body.scrollTop+document.body.clientHeight-PopMenu.offsetHeight;

      if(PopMenu.style.posTop < 0) PopMenu.style.posTop=0;

    }

  }

  function OnClick()

  {

    HideAll("rbpm",0);

  }

  // Add Your Function on following

  function Do_viewcode(){window.location="view-source:"+window.location.href;}

  function Do_help(){window.showHelp(window.location);}

  function Do_exit() {window.close();}

  function Do_refresh() {window.location.reload();}

  function Do_back() {history.back();}

  function Do_forward() {history.forward();}

  function Do_author(){alert("姓名:杨俊/n网名:风舞影天(Snwcwt)/nE_mail:snwcwt.com@263.net/n个人主页:http://202.115.147.160/snwcwt(正在制作中)/n")}

  -->

  </script>



右键级联菜单3(同一ID不能回复三次,只好用马甲了^_^)
<HTML>

<HEAD>

  <TITLE>右键菜单</TITLE>

  <style type="text/css">

  <!--

  body           {font-size: 9pt;}

  table          {font-size: 9pt; cursor: default; margin: 0;}

  tr             {height: 20;}

  tr.over        {font-size: 9pt; color: #ffffff; background-color: #66aadd; cursor: default;}

  tr.out         {font-size: 9pt; color: #ffffff; background-color: #336699; cursor: default;}

  div.rm_div     {position: absolute; filter: Alpha(Opacity='95'); display: none; border: 2px outset #3377aa; background-color: #336699; width: 0; height: 0;}

  hr.sperator    {border: 1px inset #3377aa;}

  -->

  </style>

<script language="JScript">

//************************************************

//此处插入以上代码

//************************************************

</script>

</HEAD>

<BODY oncontextmenu=window.event.returnValue=false>

<div id='snwcwt'> </div>

  <script language="JScript">

  <!--

  var menu = new RightMenu();

  menu.AddExtendMenu("location","我的链接","rbpm");

    menu.AddExtendMenu("lscit","四川工业学院校园网","location");

      menu.AddItem("scit_scit","川工首页","lscit","http://www.scit.edu.cn");

      menu.AddItem("scit_lib","川工图书馆","lscit","http://202.115.151.46");

      menu.AddItem("sperator","","lscit",null);

      menu.AddItem("scit_century","世纪学苑","lscit","http://202.115.148.230/");

      menu.AddItem("scit_the5","第五空间","lscit","http://the5.scit.edu.cn/");

      menu.AddItem("scit_lianyi","联谊网站","lscit","http://202.115.148.240");

      menu.AddItem("scit_message","信息导报","lscit","http://202.115.151.114/xx");

      menu.AddItem("scit_student","书生之家川工境象","lscit","http://202.115.151.100");

      menu.AddItem("sperator","","lscit",null);

      menu.AddItem("scit_bbs","川工BBS","lscit","http://202.115.144.32");

      menu.AddItem("scit_cbbs","世纪学苑BBS","lscit","http://202.115.144.37");

    menu.AddExtendMenu("stunet","学生网站","location");

      menu.AddItem("stu_century","世纪学苑","stunet","http://202.115.148.230/");

      menu.AddItem("stu_wjl","望江楼","stunet","http://wjl.scu.edu.cn");

      menu.AddItem("stu_freedim","自由天地","stunet","http://www.freedim.net/");

      menu.AddItem("stu_stuhome","学生之家","stunet","http://www.stuhome.net");

      menu.AddItem("stu_rw","人文网","stunet","http://www.rw.uestc.edu.cn/");

      menu.AddItem("stu_the5","第五空间","stunet","http://the5.scit.edu.cn/");

      menu.AddItem("stu_flying","我心飞扬","stunet","http://flying.swpi.edu.cn/");

      menu.AddItem("stu_21cn","21CN校园网","stunet","http://www.21cn.edu.cn/");

      menu.AddItem("stu_yaguo","网虫乐园","stunet","http://www.yaguo.com/");

    menu.AddItem("sperator","","location",null);

    menu.AddExtendMenu("computer","电脑类网站","location");

      menu.AddExtendMenu("C_all","综合性网站","computer");

        menu.AddItem("ca_yesky","天极网","C_all","http://www.yesky.com");

      menu.AddExtendMenu("C_program","程序员网站","computer");

        menu.AddItem("cp_program","中国程序员网站","C_program","http://www.chinaprogrammer.com/");

        menu.AddItem("sperator","","C_program",null);

        menu.AddItem("cp_51js","无忧脚本","C_program","http://www.51js.com/");

        menu.AddItem("sperator","","C_program",null);

        menu.AddItem("cp_active","中国动感技术网络","C_program","http://www.chinaasp.com/active/");

        menu.AddItem("cp_aspcn","ASP中华网","C_program","http://www.aspcn.com/");

        menu.AddItem("cp_aspx","中国ASP联盟","C_program","http://www.chinaspx.com/");

      menu.AddExtendMenu("C_magzine","杂志网站","computer");

        menu.AddItem("cm_cpcw","电脑报","C_magzine","http://www.cpcw.com");

        menu.AddItem("cm_cfan","电脑爱好者","C_magzine","http://www.cfan.net.cn");

        menu.AddItem("cm_popsoft","大众软件","C_magzine","http://www.popsoft.com");

      menu.AddExtendMenu("C_luntan","技术性论坛","computer");

        menu.AddItem("cl_chinaasp","ChinaASP论坛","C_luntan","http://www.chinaasp.com/sqlbbs");

      menu.AddExtendMenu("C_book","书籍下载","computer");

        menu.AddItem("cb_huachu","华储网上书店","C_book","http://www.huachu.com.cn/");

    menu.AddExtendMenu("hacker","黑客天地","location");

      menu.AddItem("hk_honker","<font style='color: #ff0000;'>中国红客联盟</font>","hacker","http://www.cnhonker.com");

    menu.AddItem("sperator","","location",null);

    menu.AddExtendMenu("lmovie","影视天地","location");

      menu.AddItem("mov_wcums","华西网上影院","lmovie","http://202.115.100.8/");

    menu.AddExtendMenu("lmusic","音乐空间","location");

      menu.AddItem("mus_tyfo","天虎音乐网","lmusic","http://music.tyfo.com/");

      menu.AddItem("mus_langqin","浪琴音乐","lmusic","http://www.langqin.net/");

      menu.AddItem("mus_wcums","华西音乐空间","lmusic","http://music.wcums.edu.cn/");

    menu.AddExtendMenu("lmud","泥巴链接","location");

      menu.AddItem("lmud_mudking","泥巴大王","lmud","http://www.mudking.com");

      menu.AddItem("lmud_justmud","泥巴城堡","lmud","http://www.justmud.com");

      menu.AddItem("lmud_mudall","世界泥巴资源","lmud","http://www.mudall.com");

      menu.AddItem("lmud_yaguo","泥潭风云","lmud","http://202.114.98.14/mud/");

    menu.AddItem("sperator","","location",null);

    menu.AddExtendMenu("lemail","电子邮局","location");

      menu.AddItem("email_263","263免费电子邮局","lemail","http://freemail.263.net");

    menu.AddExtendMenu("collections","综合性网站","location");

      menu.AddItem("coll_chinaren","中国人网站","collections","http://www.chinaren.com/");

      menu.AddItem("coll_etang","亿唐网站","collections","http://www.etang.com/");

      menu.AddItem("coll_263","263首都在线","collections","http://www.263.net/");

  menu.AddExtendMenu("leave","离开","rbpm");

    menu.AddItem("forward","前进","leave",null);

    menu.AddItem("back","后退","leave",null);

    menu.AddItem("sperator","","leave",null);

    menu.AddItem("exit","退出","leave",null);

  menu.AddItem("viewcode","查看源代码","rbpm",null);

  menu.AddItem("refresh","刷新","rbpm",null);

  menu.AddItem("sperator","","rbpm",null);

  menu.AddItem("help","帮助","rbpm",null);

  menu.AddItem("sperator","","rbpm",null);

  menu.AddItem("author","<font style='color: #ff0000'>关于作者</font>","rbpm",null);

  document.writeln(menu.GetMenu());

  snwcwt.innerText=menu.GetMenu();

  -->

  </script>

</BODY>

</HTML>

阅读更多
个人分类: ASP_开发类
上一篇HTML 中各种验证
下一篇在b/s开发中经常用到的javaScript技术。2
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭