脚 本 之 家 www.jb51.net
页面导航:  不限条件-->js
本地搜索:
functioncheckIdcard(idcard){varErrors=newArray("验证通过!","身份证号码位数不对!","身份证号码出生日期超出范围或含有非法字符!","身份证号码校验错误!","身份证地区非法!");vararea={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"...
http://www.jb51.net//article/16296.htm
[code]functionempty(v){switch(typeofv){case'undefined':returntrue;case'string':if(trim(v).length==0)returntrue;break;case'boolean':if(!v)returntrue;break;case'number':if(0===v)returntrue;break;case'object':if(null===v)returntrue;if(undefined!==v.length&&v.length==0)returntrue;for(varkinv){re...
http://www.jb51.net//article/16290.htm
下面是css2selector的语法,当然很多浏览器只是支持其中的一部分,Prototype中的Selector主要支持tag选择器、class选择器和id选择器,还有属性(attribute)选择器,基本上包含我们平时所用的所有类型ThefollowingtablesummarizesCSS2selectorsyntax,详细的可以看http://www.w3.org/TR/REC-CSS2/selector.html:PatternMeaningDescribedinsection*Matchesanyelement.UniversalselectorEMatchesanyEelement...
http://www.jb51.net//article/16284.htm
[html]<html><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"><title>可填可选的下拉框</title></head><body><inputtype="text"style="width:180px;height:20px;margin-right:-5px;margin-top:-1px;border-right:0px"name="txt"><divstyle="position:a...
http://www.jb51.net//article/16279.htm
虽然escape()、encodeURI()、encodeURIComponent()三种方法都能对一些影响URL完整性的特殊字符进行过滤。但后两者是将字符串转换为UTF-8的方式来传输,解决了页面编码不一至导致的乱码问题。例如:发送页与接受页的编码格式(Charset)不一致(假设发送页面是GB2312而接收页面编码是UTF-8),使用escape()转换传输中文字串就会出现乱码问题。以下是JS下对URL进行编/解码的各种方法:escape方法:返回一个可在所有计算机上读取的编码String对象。functionescape(charString:String):String不会被此方法编码...
http://www.jb51.net//article/16271.htm
[html]<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>Test</title><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><scriptty...
http://www.jb51.net//article/16269.htm
1.window.event兼容脚本2.屏蔽Form提交事件3.获取事件源4.添加事件兼容写法5.Firefox注册innerText写法6.长度7.父控件下的子控件8.XmlHttp1.window.event兼容脚本functiongetEvent(){//获取浏览器事件,同时兼容ie和ff的写法if(document.all)returnwindow.event;func=getEvent.caller;while(func!=null){vararg0=func.arguments[0];if(arg0){if((arg0.constructor==Event  arg0.constr...
http://www.jb51.net//article/16258.htm
函数如下:[code]functiongCL(i){varf=parseInt((i%15)/5);i=i%15%5;switch(f){case0:return"#"+cS2(255-i*51)+cS2(i*51)+"00";case1:return"#00"+cS2(255-i*51)+cS2(i*51);case2:return"#"+cS2(i*51)+"00"+cS2(255-i*51);}}functioncS2(i){vars=i.toString(16);return("00"+s).substr(s.length);}[/code]使用gCL就可以利用递增的数字返回由红到绿到...
http://www.jb51.net//article/16236.htm
[html]<SCRIPTLANGUAGE="JavaScript"><!--functionEach(list,fun){for(vari=0,len=list.length;i<len;i++){fun(list[i],i);}};vararr=[1,2,3,4,1,3]vartEach(arr.sort(),function(o,i){if(i>0&&o==t){alert("相同的:"+o);}alert(t)t=o;})//--></SCRIPT>[/html]...
http://www.jb51.net//article/16221.htm
packagecom.shaccp.web.util;importjava.util.List;publicclassPageBean{/*****@authorppy2008-10-1814:3:56*totalRecords总记录数*list保存分页的数据*pageNo当前页*pageSize页大小*query保存用户查询的字符串*pageAction操作分页的Servlet或Action(struts)*method(struts中Action对应的method)***/privateinttotalRecords;privateListlist;privateintpageNo;pri...
http://www.jb51.net//article/16211.htm
[html]<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>validatebeforeuploadbyLanceZhang</title></head><bodystyle="font-family:Calibri"><...
http://www.jb51.net//article/16210.htm
共有:1077/10,当前6/108页  [首页] [上一页] 2 3 4 5 6 7 8 9 [下一页]  [尾页] 转到: