javascript-JS技巧集-带详解注释珍藏版版[7].doc_第1页
javascript-JS技巧集-带详解注释珍藏版版[7].doc_第2页
javascript-JS技巧集-带详解注释珍藏版版[7].doc_第3页
javascript-JS技巧集-带详解注释珍藏版版[7].doc_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

/获得参数 search0) var re = /(&*?)=(&*)/g var s = a.match(re); for(var i= 0;i/可编辑SELECT 11111111 222222 333333 /设置光标位置function getCaret(textbox) var control = document.activeElement; textbox.focus(); var rang = document.selection.createRange(); rang.setEndPoint(StartToStart,textbox.createTextRange() control.focus(); return rang.text.length; function setCaret(textbox,pos) try var r =textbox.createTextRange(); r.moveStart(character,pos); r.collapse(true); r.select(); catch(e) function selectLength(textbox,start,len) try var r =textbox.createTextRange(); r.moveEnd(character,len-(textbox.value.length-start); r.moveStart(character,start); r.select(); catch(e) /alert(e.description) function insertAtCaret(textbox,text) textbox.focus(); document.selection.createRange().text = text; /页内查找function findInPage(str) var txt, i, found,n = 0; if (str = ) return false; txt = document.body.createTextRange(); for (i = 0; i 0) n = 0; findInPage(str); else alert(str + . 您要找的文字不存在。n n请试着输入页面中的关键字再次查找!); return false; /书/attachment.php?s=&postid=1894598/down/listdown.aspx?id=1341 /操作EXECLfunction jStartExcel() var xls = new ActiveXObject ( Excel.Application ); xls.visible = true; var newBook = xls.Workbooks.Add; newBook.Worksheets.Add; newBook.Worksheets(1).Activate; xls.ActiveWorkBook.ActiveSheet.PageSetup.Orientation = 2; xls.ActiveWorkBook.ActiveSheet.PageSetup.PaperSize = 5; newBook.Worksheets(1).Columns(A).columnwidth=50; newBook.Worksheets(1).Columns(A).WrapText = true; newBook.Worksheets(1).Columns(B).columnwidth=50; newBook.Worksheets(1).Columns(B).WrapText = true; newBook.Worksheets(1).Range(A1:B1000).NumberFormat = 0; newBook.Worksheets(1).Range(A1:B1000).HorizontalAlignment = -4131; newBook.Worksheets(1).Cells(1,1).Interior.ColorIndex=15; newBook.Worksheets(1).Cells(1,1).value=First Column, First Cell; newBook.Worksheets(1).Cells(2,1).value=First Column, Second Cell; newBook.Worksheets(1).Cells(1,2).value=Second Column, First Cell; newBook.Worksheets(1).Cells(2,2).value=Second Column, Second Cell; newBook.Worksheets(1).Name=My First WorkSheet;/自定义提示条tip /*默认设置定义.*tPopWait=50;/停留tWait豪秒后显示提示。tPopShow=5000;/显示tShow豪秒后关闭提示showPopStep=20; popOpacity=99; /*内部变量定义*sPop=null; curShow=null; tFadeOut=null; tFadeIn=null; tFadeWaiting=null; document.write(); document.write(.cPopText background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0); document.write(); document.write(); function showPopupText() var o=event.srcElement; MouseX=event.x; MouseY=event.y; if(o.alt!=null & o.alt!=)o.dypop=o.alt;o.alt=; if(o.title!=null & o.title!=)o.dypop=o.title;o.title=; if(o.dypop!=sPop) sPop=o.dypop; clearTimeout(curShow); clearTimeout(tFadeOut); clearTimeout(tFadeIn); clearTimeout(tFadeWaiting); if(sPop=null | sPop=) dypopLayer.innerHTML=; dypopLayer.style.filter=Alpha(); dypopLayer.filters.Alpha.opacity=0; else if(o.dyclass!=null) popStyle=o.dyclass else popStyle=cPopText; curShow=setTimeout(showIt(),tPopWait); function showIt() dypopLayer.className=popStyle; dypopLayer.innerHTML=sPop; popWidth=dypopLayer.clientWidth; popHeight=dypopLayer.clientHeight; if(MouseX+12+popWidthdocument.body.clientWidth) popLeftAdjust=-popWidth-24 else popLeftAdjust=0; if(MouseY+12+popHeightdocument.body.clientHeight) popTopAdjust=-popHeight-24 else popTopAdjust=0; dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust; dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust; dypopLayer.style.filter=A

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论