ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:18.02KB ,
资源ID:6662979      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-6662979.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(js修改表格样式Word格式文档下载.docx)为本站会员(b****4)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

js修改表格样式Word格式文档下载.docx

1、680px;#contentmargin:table,tdfont:88%arial,helvetica,sans-serif;tablewidth:100%;border-collapse:collapse;1em0;th,tdtext-align:center;0.5em;border:1pxsolid#fff;thbackground:#328aa4url(tr_back.gif)repeat-x;#fff;tdbackground:#e5f1f4;/*tableclothstyles*/tr.eventdbackground:tr.oddtdbackground:#f8fbfc;th.

2、over,tr.eventh.over,tr.oddth.overbackground:#4a98af;th.down,tr.eventh.down,tr.oddth.downbackground:#bce774;th.selected,tr.eventh.selected,tr.oddth.selectedtd.over,tr.eventd.over,tr.oddtd.overbackground:#ecfbd4;td.down,tr.eventd.down,tr.oddtd.downbackground:td.selected,tr.eventd.selected,tr.oddtd.sel

3、ectedbackground:/*usethisifyouwanttoapplydifferentstyleingtoemptytablecells*/td.empty,tr.oddtd.empty,tr.eventd.emptybackground:this.tablecloth=function()/conFig/ifsettotruethenmouseoveratablecellwillhighlightentirecolumn(exceptsiblingheadings)varhighlightcols=true;/ifsettotruethenmouseoveratablecell

4、willhighlightentirerow(exceptsiblingheadings)varhighlightRows=true;/ifsettotruethenclickonatablesellwillselectroworcolumnbasedonconfigvarselectable=true;/thisfunctioniscalledwhen/addyourowncodeifyouwanttoaddaction/functionreceivesobjectthathasbeenclickedthis.clickaction=function(obj)/alert(obj.inner

5、html);/endconFig(donoteditbelowthisline)vartableover=false;this.start=function()vartables=document.getelementsbytagname(table);for(vari=0;itablesi.onmouseover=function()tableover=true;tablesi.onmouseout=function()tableover=false;rows(tablesi);this.rows=function(table)varcss=;vartr=table.getelementsb

6、ytagname(tricss=(css=odd)even:tri.classname=css;vararr=newarray();for(varj=0;jif(tri.childnodesj.nodetype=1)arr.push(tri.childnodesj);jarrj.row=i;arrj.col=j;if(arrj.innerhtml=|arrj.innerhtml=)arrj.classname+=emptyarrj.css=arrj.classname;arrj.onmouseover=function()over(table,this,this.row,this.col);a

7、rrj.onmouseout=function()out(table,this,this.row,this.col);arrj.onmousedown=function()down(table,this,this.row,this.col);arrj.onmouseup=function()up(table,this,this.row,this.col);arrj.onclick=function()click(table,this,this.row,this.col);/appylingmouseoverstateforobjects(thortd)this.over=function(ta

8、ble,obj,row,col)if(!highlightcolsif(check1(obj,col)if(highlightcols)highlightcol(table,obj,col);if(highlightRows)highlightRow(table,obj,row);/appylingmouseoutstateforobjects(thortd)this.out=function(table,obj,row,col)if(!highlightcolsunhighlightcol(table,col);unhighlightRow(table,row);/appylingmouse

9、downstateforobjects(thortd)this.down=function(table,obj,row,col)obj.classname=obj.css+down/appylingmouseupstateforobjects(thortd)this.up=function(table,obj,row,col)obj.classname=obj.css+over/onclickeventforobjects(thortd)this.click=function(table,obj,row,col)if(check1)if(selectable)unselect(table);i

10、f(highlightcols)highlightcol(table,obj,col,true);if(highlightRows)highlightRow(table,obj,row,true);document.onclick=unselectall;clickaction(obj);this.highlightcol=function(table,active,col,sel)varcss=(typeof(sel)!=undefinedselectedvartr=table.getelementsbytagname(for(vari=0;ifor(vari=0;ifor(varj=0;j

11、varobj=tri.childnodesj;if(obj.classname)obj.classname=obj.classname.replace(,this.unselectall=function()if(!tableover)tables=document.getelementsbytagname(iunselect(tablesi)this.check1=function(obj,col)return(!(col=0this.check2=function(active,obj)(active.tagname=ththis.check3=function(obj)return(ob

12、j.classname)(obj.classname.indexof()=-1):true;start();/*scriptinitiatesonpageload.*/window.onload=tablecloth;tablecloth:exampletitle篇二:js验证表单大全+css样式js验证表单大全1.长度限制functiontest()if(document.a.b.value.length50)alert(不能超过50个字符!document.a.b.focus();returnfalse;2.只能是汉字3.只能是英文functiononlyeng()(event.keyco

13、de=654.只能是数字functiononlynum()(event.keycode=485.只能是英文字符和数字onbeforepaste=clipboarddata.setdata(text,clipboarddata.getdata(text).replace(/d/g,)6.验证油箱格式functionisemail(stremail)if(stremail.search(/w+(-w+)|(.w+)*a-za-z0-9+(.|-)a-za-z0-9+)*.a-za-z0-9+$/)!=-1)returntrue;elseoh7.屏蔽关键字(这里屏蔽*和*)functiontest(

14、)if(a.b.value.indexof(*)=0)|(a.b.value.indexof(*)=0)a.b.focus();8.两次输入密码是否相同functioncheck()with(document.all)if(input1.value!=input2.value)false)input1.value=input2.value=elsedocument.forms0.submit();够了吧:屏蔽右键很酷oncontextmenu=returnfalseondragstart=onselectstart=加在body中二2.1表单项不能为空functioncheckForm()if

15、(document.form.name.value.length=0)请输入您姓名!document.form.name.focus();-2.2比较两个表单项的值是否相同if(document.form.pwd.value!=document.form.pwd_again.value)alert(您两次输入的密码不一样!请重新输入.document.adduser.pwd.focus();2.3表单项只能为数字和_,用于电话/银行帐号验证上,可扩展到域名注册等functionisnumber(string)varletters=1234567890-/可以自己增加可输入值vari;varc;

16、if(string.charat(0)=-)if(string.charat(string.length-1)=-)for(i=0;ic=string.charat(i);if(letters.indexof(c)returnfalse;functioncheckForm()isnumber(document.form.tel.value)您的电话号码不合法!document.form.tel.focus();2.4表单项输入数值/长度限定if(document.form.count.value100|document.form.count.value输入数值不能小于零大于100!docume

17、nt.form.count.focus();if(document.form.message.value.length输入文字小于10!document.form.message.focus();returntrue;/-2.5中文/英文/数字/邮件地址合法性判断functionisenglish(name)/英文值检测if(name.length=0)i128)functionischinese(name)/中文值检测functionismail(name)/e-mail值检测isenglish(name)i=name.indexof(atj=namedotlastindexof(if(i=

18、-1)if(i!=j)if(i=namedotlength)篇三:js分页、表格、生成数据js分页、表格、生成数据使用js控制分页参考博客园的样式,效果如下:使用js创建表格/js表格生成表格代码/arrth表头信息/arrtr数据vargettable=function(arrth,arrtr)vars=;s+=;is+=+arrthi+;is+=;js+=+arrtrij+;returns;js分页/js分页/el:分页容器count:总记录数pagestep:每页显示多少个pagenum:第几页fngo:分页跳转函数varjspage=function(el,count,pagestep

19、,pagenum,fngo)this.getlink=function(fngo,index,pagenum,text)vars=if(index=pagenum)s+=class=acurtext=text|index;s+=+text+;/总页数varpagenumall=math.ceil(count/pagestep);if(pagenumall=1)divpage.innerhtml=;return;varitemnum=5;/当前页左右两边显示个数pagenum=math.max(pagenum,1);pagenum=math.min(pagenum,pagenumall);if(

20、pagenum1)s+=this.getlink(fngo,pagenum-1,pagenum,上一页);elses+=上一页;varbegin=1;if(pagenum-itemnums+=this.getlink(fngo,1,pagenum)+.;begin=pagenum-itemnum;varend=math.min(pagenumall,begin+itemnum*2);if(end=pagenumall-1)end=pagenumall;for(vari=begin;is+=this.getlink(fngo,i,pagenum);if(ends+=.+this.getlink(

21、fngo,pagenumall,pagenum);if(pagenums+=this.getlink(fngo,pagenum+1,pagenum,下一页);s+=下一页;vardivpage=document.getelementbyid(el);divpage.innerhtml=s;js返回随机数据/js随机内容varjsRand=;/随机数字jsRand.int=function(min,max)returnthis.show(i,min,max);/随机字符jsRand.str=jsRand.string=function(min,max)returnthis.show(,min,m

22、ax);/随机日期jsRand.date=function()returnthis.show(d);/随机金额jsRand.money=function(min,max)returnthis.show(m,min,max);/随机汉字jsRand.ch=function(min,max)returnthis.show(ch,min,max);jsRand.show=function(type,min,max)varstr;if(type=i)str=this.rand(min,max);elseif(type=m)str=¥+this.rand(min,max)+.00;elseif(type=d)str=this.rand(1990,2020)+-;str+=this.rand(1,12,2)+-;str+=this.rand(1,31,2)+;str+=this.rand(0,23,2)+:str+=this.rand(1,59,2);elsemin=min|0;max=max|10;str=;varlen=this.rand(min,ma

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2