资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
不会死机的js 格式代码
<html> <head> <title>JSer </title> <meta http-equiv="content-type" content="text/html; charset=gb2312" /> <style> /* Global CSS */ * { padding:0px; margin:0px; font-size:13px; font-family: arial 宋体; } body { overflow:auto; border:0px none black; background-color:buttonface; } li { margin:0px 0px 0px 40px; padding:2px 4px; } /* Class CSS */ .quote { color:#999; } .comments { color: #009090; } .indent { margin-left:25px; } .regexp { color:#F000F0; } /* Identified CSS */ #divTools { height:20px; border-bottom:1px solid #555; padding-left:15px; } #divTools a { color:navy; text-decoration:none; height:20px; line-height:20px; padding:0px 25px; } #divTools a:hover { color:white; background-color:navy; text-decoration:none; height:20px; line-height:20px; } #divJSInput { display:none; width:600px; height:450px; border:2px outset buttonface; position:absolute; background-color:buttonface; z-Index:2; } #divJSInputTitle { color:white; background-color:navy; height:20px; line-height:20px; padding:0px 10px; cursor:default; } #txtJSInput { width:598px; height:406px; overflow:auto; padding:4px 8px; background-color:white;} #divJSInputBar { height:24px; padding:0px 4px; } #divJSInputBar input { width:110px; height:22px; border:1px solid #555; line-height:20px; } #divJSOutput { background-color:white; border:1px inset buttonface; width:100%; height:500px; overflow:auto; } #divWaiting { display:none; width:400px; height:60px; border:1px solid buttonface; position:absolute; background-color:#E0F0F0; z-Index:3; text-align:center; padding-top:10px; } #divWaiting input { width:140px; height:22px; border:1px solid #555; line-height:20px; cursor:default; margin-top:4px; } </style> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%20%0D%0A%2F**********************%20%0D%0A%20Author%3A%20Hutia%20%0D%0A%20%20%0D%0A*********************%2F%20%0D%0A%0D%0Awindow.onload%3Dinit%3B%20%0D%0A%0D%0A%0D%0A%2F%2F------------------%20%0D%0A%2F%2F%20Static%20Variable%20%0D%0A%2F%2F------------------%20%0D%0A%0D%0Avar%20KEYWORDS%3D%22abstract%20break%20byte%20case%20catch%20char%20class%20const%20continue%20default%20delete%20do%20double%20else%20extends%20false%20final%20finally%20float%20for%20function%20goto%20if%20implements%20import%20in%20instanceof%20int%20interface%20long%20native%20null%20package%20private%20protected%20public%20reset%20return%20short%20static%20super%20switch%20synchronized%20this%20throw%20transient%20true%20try%20var%20void%20while%20with%22%3B%20%0D%0Avar%20OBJECTS%3D%22Anchor%20Applet%20Area%20Arguments%20Array%20Boolean%20Button%20Checkbox%20Collection%20Crypto%20Date%20Dictionary%20Document%20Drive%20Drives%20Element%20Enumerator%20Event%20File%20FileObject%20FileSystemObject%20FileUpload%20Folder%20Folders%20Form%20Frame%20Function%20Global%20Hidden%20History%20HTMLElement%20Image%20Infinity%20Input%20JavaArray%20JavaClass%20JavaObject%20JavaPackage%20JSObject%20Layer%20Link%20Math%20MimeType%20Navigator%20Number%20Object%20Option%20Packages%20Password%20Plugin%20PrivilegeManager%20Random%20RegExp%20Screen%20Select%20String%20Submit%20Text%20Textarea%20URL%20VBArray%20Window%20WScript%22%3B%20%0D%0Avar%20METHODS_PROPERTIES%3D%22above%20abs%20acos%20action%20activeElement%20alert%20alinkColor%20all%20altKey%20anchor%20anchors%20appCodeName%20applets%20apply%20appName%20appVersion%20arguments%20arity%20asin%20assign%20atan%20atan2%20atob%20%20availHeight%20availLeft%20availTop%20availWidth%20ActiveXObject%20back%20background%20below%20bgColor%20big%20blink%20blur%20bold%20border%20borderWidths%20bottom%20btoa%20button%20call%20callee%20caller%20cancelBubble%20captureEvents%20ceil%20charAt%20charCodeAt%20charset%20checked%20children%20classes%20className%20clear%20clearInterval%20clearTimeout%20click%20clientInformation%20%20clientX%20clientY%20close%20closed%20colorDepth%20compile%20complete%20concat%20confirm%20constructir%20contains%20contextual%20cookie%20cos%20crypto%20ctrlKey%20current%20data%20defaultCharset%20defaultChecked%20defaultSelected%20defaultStatus%20defaultValue%20description%20disableExternalCapture%20disablePrivilege%20document%20domain%20E%20Echo%20%20element%20elements%20embeds%20enabledPlugin%20enableExternalCapture%20enablePrivilege%20encoding%20escape%20eval%20event%20exec%20exp%20expando%20FromPoint%20fgColor%20fileName%20find%20fixed%20floor%20focus%20fontColor%20fontSize%20form%20forms%20forward%20frames%20fromCharCode%20fromElement%20%20getAttribute%20get%20getClass%20getDate%20getDay%20getFullYear%20getHours%20getMember%20getMilliseconds%20getMinutes%20getMonth%20getSeconds%20getSelection%20getSlot%20getTime%20getTimezoneOffset%20%20getUTCDate%20getUTCDay%20getUTCFullYear%20getUTCHours%20getUTCMilliseconds%20getUTCMinutes%20getUTCMonth%20getUTCSeconds%20getWindow%20getYear%20global%20go%20HandleEvent%20Height%20%20hash%20hidden%20history%20home%20host%20hostName%20href%20hspace%20id%20ids%20ignoreCase%20images%20index%20indexOf%20inner%20innerHTML%20innerText%20innerWidth%20insertAdjacentHTML%20insertAdjacentText%20isFinite%20isNAN%20italics%20java%20javaEnabled%20join%20keyCode%20Links%20LN10%20LN2%20LOG10E%20LOG2E%20%20lang%20language%20lastIndex%20lastIndexOf%20lastMatch%20lastModified%20lastParen%20layers%20layerX%20layerY%20left%20leftContext%20length%20link%20linkColor%20load%20location%20locationBar%20log%20lowsrc%20MAX_VALUE%20MIN_VALUE%20%20margins%20match%20max%20menubar%20method%20mimeTypes%20min%20modifiers%20moveAbove%20moveBelow%20moveBy%20moveTo%20moveToAbsolute%20multiline%20NaN%20NEGATIVE_INFINITY%20%20name%20navigate%20navigator%20netscape%20next%20number%20offscreenBuffering%20offset%20offsetHeight%20offsetLeft%20offsetParent%20offsetTop%20offsetWidth%20offsetX%20offsetY%20onabort%20onblur%20onchange%20onclick%20ondblclick%20ondragdrop%20onerror%20onfocus%20%20onHelp%20onkeydown%20onkeypress%20onkeyup%20onload%20onmousedown%20onmousemove%20onmouseout%20onmouseover%20onmouseup%20onmove%20onreset%20onresize%20onsubmit%20onunload%20open%20opener%20options%20outerHeight%20%20outerHTML%20outerText%20outerWidth%20POSITIVE_INFINITY%20PI%20%20paddings%20pageX%20pageXOffset%20pageY%20pageYOffset%20parent%20parentElement%20parentLayer%20parentWindow%20parse%20parseFloat%20parseInt%20pathname%20personalbar%20pixelDepth%20platform%20plugins%20pop%20%20port%20pow%20preference%20previous%20print%20prompt%20protocol%20prototype%20push%20random%20readyState%20reason%20referrer%20refresh%20releaseEvents%20reload%20removeAttribute%20removeMember%20replace%20resizeBy%20resizeTo%20returnValue%20reverse%20right%20rightcontext%20round%20SQRT1_2%20SQRT2%20%20screenX%20screenY%20scroll%20scrollbars%20scrollBy%20scrollIntoView%20scrollTo%20search%20select%20selected%20selectedIndex%20self%20setAttribute%20setDay%20setFullYear%20setHotkeys%20setHours%20setInterval%20%20setMember%20setMilliseconds%20setMinutes%20setMonth%20setResizable%20setSeconds%20setSlot%20setTime%20setTimeout%20setUTCDate%20setUTCFullYear%20setUTCHours%20setUTCMillseconds%20setUTCMinutes%20%20setUTCMonth%20setUTCSeconds%20setYear%20setZOptions%20shift%20shiftKey%20siblingAbove%20siblingBelow%20signText%20sin%20slice%20smallsort%20source%20sourceIndex%20splice%20split%20sqrt%20src%20%20srcElement%20srcFilter%20status%20statusbar%20stop%20strike%20style%20sub%20submit%20substr%20substring%20suffixes%20sun%20sup%20systemLanguage%20TYPE%20%20tagName%20tags%20taint%20taintEnabled%20tan%20target%20test%20text%20title%20toElement%20toGMTString%20toLocaleString%20toLowerCase%20toolbar%20top%20toString%20toUpperCase%20toUTCString%20type%20typeOf%20UTC%20unescape%20unshift%20untaint%20unwatch%20userAgent%20userLanguage%20%20value%20valueOf%20visibility%20vlinkColor%20vspace%20watch%20which%20width%20window%20write%20writeln%20x%20y%20zIndex%22%3B%20%0D%0Avar%20OPS%3D%22!%20%24%20%25%20%26%20*%20%2B%20-%20%2F%2F%20%2F%20%3A%20%3C%20%3D%20%3E%20%3F%20%5B%20%5D%20%5E%20%7C%20~%20is%20%20new%20sizeof%20%20typeof%20unchecked%22%3B%20%0D%0A%0D%0Avar%20regKW%3Dnew%20RegExp(%22(%5C%5CW%22%2BKEYWORDS.replace(%2F%20%2Fg%2C%22%24)%7C(%5C%5CW%22)%2B%22%24)%22%2C%22g%22)%3B%20%0D%0Avar%20regObj%3Dnew%20RegExp(%22(%5C%5CW%22%2BOBJECTS.replace(%2F%20%2Fg%2C%22%24)%7C(%5C%5CW%22)%2B%22%24)%22%2C%22g%22)%3B%20%0D%0Avar%20regMP%3Dnew%20RegExp(%22(%5C%5CW%22%2BMETHODS_PROPERTIES.replace(%2F%20%2Fg%2C%22%24)%7C(%5C%5CW%22)%2B%22%24)%22%2C%22g%22)%3B%20%0D%0A%2F%2Fvar%20regOP%3Dnew%20RegExp(%22(%5C%5CW%22%2BOPS.replace(%2F%20%2Fg%2C%22%24)%7C(%5C%5CW%22)%2B%22%24)%22%2C%22g%22)%3B%20%0D%0A%0D%0Avar%20colorKW%3D%22blue%22%3B%20%0D%0Avar%20colorObj%3D%22red%22%3B%20%0D%0Avar%20colorMP%3D%22%23FF8000%22%3B%20%0D%0Avar%20colorOP%3D%22%23004000%22%3B%20%0D%0A%0D%0A%2F%2F------------------%20%0D%0A%2F%2F%20Global%20Variables%20%0D%0A%2F%2F------------------%20%0D%0Avar%20divJSInput%2C%20txtJSInput%2C%20divJSOutput%2C%20divWaiting%2C%20spnProcess%3B%20%0D%0Avar%20glbStr%2C%20glbP%2C%20glbRe%2C%20curRe%2C%20glbTimer%3B%20%0D%0A%0D%0A%0D%0Afunction%20init()%7B%20%0D%0A%20%2F%2F%20init%20global%20variables%20%0D%0A%20divJSInput%3Ddocument.getElementById(%22divJSInput%22)%3B%20%0D%0A%20txtJSInput%3Ddocument.getElementById(%22txtJSInput%22)%3B%20%0D%0A%20divJSOutput%3Ddocument.getElementById(%22divJSOutput%22)%3B%20%0D%0A%20divWaiting%3Ddocument.getElementById(%22divWaiting%22)%3B%20%0D%0A%20spnProcess%3Ddocument.getElementById(%22spnProcess%22)%3B%20%0D%0A%20%20%0D%0A%20%2F%2F%20init%20window%20state%20%0D%0A%20maximizeWindow()%3B%20%0D%0A%20%20%0D%0A%20divJSOutput.style.width%3Ddocument.body.clientWidth-2%3B%20%0D%0A%20divJSOutput.style.height%3Ddocument.body.clientHeight-26%3B%20%0D%0A%20%20%0D%0A%20%2F%2F%20init%20global%20events%20%0D%0A%20divJSInput.onkeydown%3DdivJSInput_keydown%3B%20%0D%0A%7D%20%0D%0A%0D%0A%0D%0A%2F%2F------------------%20%0D%0A%2F%2F%20event%20scripts%20%0D%0A%2F%2F------------------%20%0D%0A%0D%0Afunction%20divJSInput_keydown(e)%7B%20%0D%0A%20var%20e%3Dwindow.event%3Fwindow.event%3Ae%3B%20%0D%0A%20var%20srcEle%3De.srcElement%3Fe.srcElement%3Ae.target%3B%20%0D%0A%20var%20sel%3B%20%0D%0A%20if(e.keyCode%3D%3D27)hideJSInput()%3B%20%0D%0A%20if(e.keyCode%3D%3D13%26%26e.ctrlKey)execJSInput()%3B%20%0D%0A%20if(e.keyCode%3D%3D9%26%26srcEle%3D%3DtxtJSInput)%7B%20%0D%0A%20%20document.selection.createRange().text%3D%22%5Ct%22%3Breturn(false)%3B%20%2F%2F%20not%20support%20FF%20%20%0D%0A%20%7D%20%0D%0A%7D%20%0D%0A%0D%0A%0D%0A%0D%0A%2F%2F------------------%20%0D%0A%2F%2F%20functional%20scripts%20%0D%0A%2F%2F------------------%20%0D%0A%0D%0Afunction%20showJSInput()%7B%20%0D%0A%20with(divJSInput.style)%7B%20%0D%0A%20%20display%3D%22block%22%3B%20%0D%0A%20%20left%3D(document.body.clientWidth-divJSInput.offsetWidth)%2F2%3B%20%0D%0A%20%20top%3D(document.body.clientHeight-divJSInput.offsetHeight)%2F2%3B%20%0D%0A%20%7D%20%0D%0A%20%20%0D%0A%20txtJSInput.focus()%3B%20%0D%0A%20%20%0D%0A%20return(false)%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20hideJSInput()%7B%20%0D%0A%20divJSInput.style.display%3D%22none%22%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20execJSInput()%7B%20%0D%0A%20hideJSInput()%3B%20%0D%0A%20%20%0D%0A%20divJSOutput.innerHTML%3D%22%22%3B%20%0D%0A%20%20%0D%0A%20glbStr%3DtxtJSInput.value.replace(%2F%5Cr%5Cn%5B%20%5Ct%5D%2B%2Fgi%2C%22%5Cr%5Cn%22).replace(%2F(%5Cr%5Cn)%2B%2Fgi%2C%22%5Cr%5Cn%22)%3B%20%0D%0A%20glbP%3D0%3B%20%0D%0A%20curRe%3DglbRe%3Ddocument.createElement(%22div%22)%3B%20%0D%0A%20%20%0D%0A%20divJSOutput.appendChild(glbRe)%3B%20%0D%0A%20%20%0D%0A%20glbRe.className%3D%22codeRoot%22%3B%20%0D%0A%20%20%0D%0A%20showWait()%3B%20%0D%0A%20core_analysis()%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20showWait()%7B%20%0D%0A%20document.body.style.cursor%3D%22wait%22%3B%20%0D%0A%20%20%0D%0A%20with(divWaiting.style)%7B%20%0D%0A%20%20display%3D%22block%22%3B%20%0D%0A%20%20left%3D(document.body.clientWidth-divWaiting.offsetWidth)%2F2%3B%20%0D%0A%20%20top%3D(document.body.clientHeight-divWaiting.offsetHeight)%2F2%3B%20%0D%0A%20%7D%20%0D%0A%20spnProcess.innerHTML%3D%220.00%25%20%20(%200%20%2F%200%20)%22%20%0D%0A%20return(false)%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20stopExec()%7B%20%0D%0A%20document.body.style.cursor%3D%22%22%3B%20%0D%0A%20divWaiting.style.display%3D%22none%22%3B%20%0D%0A%20try%7BclearTimeout(glbTimer)%3B%7Dcatch(e)%7B%7D%20%0D%0A%20%20%0D%0A%20return(false)%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20core_analysis()%7B%20%0D%0A%20var%20str%3D%22%20%22%2C%20c%3D%22%22%2C%20lastState%3D%22%22%2C%20seq%2C%20intNextQuote%2C%20intTemp%2C%20intCount%2C%20intWordStart%3B%20%0D%0A%20spnProcess.innerHTML%3DparseFloat(glbP%2FglbStr.length*100).toFixed(2)%2B%22%25%20%20(%20%22%2BglbP%2B%22%20%2F%20%22%2BglbStr.length%2B%22%20)%22%3B%20%0D%0A%20for(var%20i%3DglbP%3Bi%3CglbStr.length%3Bi%2B%2B)%7B%20%0D%0A%20%20c%3DglbStr.charAt(i)%3B%20%0D%0A%20%20str%2B%3DhtmlEncode(c)%3B%20%0D%0A%20%20switch(c)%7B%20%0D%0A%20%20%20case%20%22%5Cr%22%3A%20case%20%22%20%22%3A%20case%20%22%5Ct%22%3A%20%0D%0A%20%20%20%20if(lastState%3D%3D%22%5Cr%5Cn%22)%7Bstr%3D%22%20%22%3Bbreak%3B%7D%20%0D%0A%20%20%20%20if(c.match(%2F%5CW%2F)%26%26glbStr.charAt(i-1).match(%2F%5Cw%2F))%7B%20%0D%0A%20%20%20%20%20str%3Dstr.substring(0%2Cstr.length-htmlEncode(c).length)%3B%20%0D%0A%20%20%20%20%20str%3Dstr.replace(regKW%2CclKW).replace(regObj%2CclObj).replace(regMP%2CclMP)%2BhtmlEncode(c)%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20case%20%22%5Cn%22%3A%20case%20%22%3B%22%3A%20%0D%0A%20%20%20%20if(lastState%3D%3D%22%5Cr%5Cn%22)%7Bstr%3D%22%20%22%3Bbreak%3B%7D%20%0D%0A%20%20%20%20outputLn(str)%3B%20%0D%0A%20%20%20%20str%3D%22%20%22%3B%20%0D%0A%20%20%20%20lastState%3D%22%5Cr%5Cn%22%3B%20%0D%0A%20%20%20%20if(i-glbP%3E200)%7B%20%0D%0A%20%20%20%20%20glbP%3Di%2B1%3B%20%0D%0A%20%20%20%20%20glbTimer%3DsetTimeout(core_analysis)%3B%20%0D%0A%20%20%20%20%20return%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20case%20%22%5C%22%22%3A%20%0D%0A%20%20%20%20intNextQuote%3Di%3B%20%0D%0A%20%20%20%20while(intNextQuote!%3D-1%26%26intNextQuote%3CglbStr.length)%7B%20%0D%0A%20%20%20%20%20intNextQuote%3DglbStr.indexOf(%22%5C%22%22%2CintNextQuote%2B1)%3B%20%0D%0A%20%20%20%20%20if(intNextQuote%3D%3D-1%7C%7CglbStr.charAt(intNextQuote-1)!%3D%22%5C%5C%22)break%3B%20%0D%0A%20%20%20%20%20intCount%3D0%3B%20intTemp%3DintNextQuote%3B%20%0D%0A%20%20%20%20%20while(glbStr.charAt(--intTemp)%3D%3D%22%5C%5C%22)intCount%2B%2B%3B%20%0D%0A%20%20%20%20%20if(intCount%252%3D%3D0)break%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20if(intNextQuote%3D%3D-1)break%3B%20%0D%0A%20%20%20%20str%2B%3D%22%3Cspan%20class%3D%5C%22quote%5C%22%3E%22%2BhtmlEncode(glbStr.substring(i%2B1%2CintNextQuote))%2B%22%3C%5C%2Fspan%3E%5C%22%22%3B%20%0D%0A%20%20%20%20i%3DintNextQuote%3B%20%0D%0A%20%20%20%20lastState%3D%22%22%3B%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20case%20%22%5C'%22%3A%20%0D%0A%20%20%20%20intNextQuote%3Di%3B%20%0D%0A%20%20%20%20while(intNextQuote!%3D-1%26%26intNextQuote%3CglbStr.length)%7B%20%0D%0A%20%20%20%20%20intNextQuote%3DglbStr.indexOf(%22%5C'%22%2CintNextQuote%2B1)%3B%20%0D%0A%20%20%20%20%20if(intNextQuote%3D%3D-1%7C%7CglbStr.charAt(intNextQuote-1)!%3D%22%5C%5C%22)break%3B%20%0D%0A%20%20%20%20%20intCount%3D0%3B%20intTemp%3DintNextQuote%3B%20%0D%0A%20%20%20%20%20while(glbStr.charAt(--intTemp)%3D%3D%22%5C%5C%22)intCount%2B%2B%3B%20%0D%0A%20%20%20%20%20if(intCount%252%3D%3D0)break%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20if(intNextQuote%3D%3D-1)break%3B%20%0D%0A%20%20%20%20str%2B%3D%22%3Cspan%20class%3D%5C%22quote%5C%22%3E%22%2BhtmlEncode(glbStr.substring(i%2B1%2CintNextQuote))%2B%22%3C%5C%2Fspan%3E%5C'%22%3B%20%0D%0A%20%20%20%20i%3DintNextQuote%3B%20%0D%0A%20%20%20%20lastState%3D%22%22%3B%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20case%20%22%5C%2F%22%3A%20%0D%0A%20%20%20%20if(glbStr.charAt(i%2B1)%3D%3D%22%5C%2F%22)%7B%20%0D%0A%20%20%20%20%20intNextQuote%3Di%3B%20%0D%0A%20%20%20%20%20intNextQuote%3DglbStr.indexOf(%22%5Cr%5Cn%22%2CintNextQuote%2B1)%3B%20%0D%0A%20%20%20%20%20if(intNextQuote%3D%3D-1)intNextQuote%3DglbStr.length%3B%20%0D%0A%20%20%20%20%20str%3Dstr.substring(0%2Cstr.length-1)%3B%20%0D%0A%20%20%20%20%20str%2B%3D%22%3Cspan%20class%3D%5C%22comments%5C%22%3E%5C%2F%22%2BhtmlEncode(glbStr.substring(i%2B1%2CintNextQuote))%2B%22%3C%5C%2Fspan%3E%22%3B%20%0D%0A%20%20%20%20%20i%3DintNextQuote%3B%20%0D%0A%20%20%20%20%7Delse%20if(glbStr.charAt(i%2B1)%3D%3D%22*%22)%7B%20%0D%0A%20%20%20%20%20intNextQuote%3Di%3B%20%0D%0A%20%20%20%20%20intNextQuote%3DglbStr.indexOf(%22*%5C%2F%22%2CintNextQuote%2B1)%3B%20%0D%0A%20%20%20%20%20if(intNextQuote%3D%3D-1)return%3B%20%0D%0A%20%20%20%20%20str%3Dstr.substring(0%2Cstr.length-1)%3B%20%0D%0A%20%20%20%20%20str%2B%3D%22%3Cspan%20class%3D%5C%22comments%5C%22%3E%5C%2F%22%2BhtmlEncode(glbStr.substring(i%2B1%2CintNextQuote))%2B%22*%5C%2F%3C%5C%2Fspan%3E%22%3B%20%0D%0A%20%20%20%20%20i%3DintNextQuote%2B1%3B%20%0D%0A%20%20%20%20%7Delse%20if(str.match(%2F%5B%3D(%5D%5B%20%5Ct%5D*%5C%2F%2F))%7B%20%0D%0A%20%20%20%20%20intNextQuote%3Di%3B%20%0D%0A%20%20%20%20%20while(intNextQuote!%3D-1%26%26intNextQuote%3CglbStr.length)%7B%20%0D%0A%20%20%20%20%20%20intNextQuote%3DglbStr.indexOf(%22%5C%2F%22%2CintNextQuote%2B1)%3B%20%0D%0A%20%20%20%20%20%20if(intNextQuote%3D%3D-1%7C%7CglbStr.charAt(intNextQuote-1)!%3D%22%5C%5C%22)break%3B%20%0D%0A%20%20%20%20%20%20intCount%3D0%3B%20intTemp%3DintNextQuote%3B%20%0D%0A%20%20%20%20%20%20while(glbStr.charAt(--intTemp)%3D%3D%22%5C%5C%22)intCount%2B%2B%3B%20%0D%0A%20%20%20%20%20%20if(intCount%252%3D%3D0)break%3B%20%0D%0A%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20if(intNextQuote%3D%3D-1)break%3B%20%0D%0A%20%20%20%20%20str%2B%3D%22%3Cspan%20class%3D%5C%22regexp%5C%22%3E%22%2BhtmlEncode(glbStr.substring(i%2B1%2CintNextQuote))%2B%22%3C%5C%2Fspan%3E%5C%2F%22%3B%20%0D%0A%20%20%20%20%20i%3DintNextQuote%3B%20%0D%0A%20%20%20%20%20lastState%3D%22%22%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20lastState%3D%22%22%3B%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20case%20%22%7B%22%3A%20%0D%0A%20%20%20%20outputLn(str)%3B%20%0D%0A%20%20%20%20str%3D%22%20%22%3B%20%0D%0A%20%20%20%20seq%3Ddocument.createElement(%22div%22)%3B%20%0D%0A%20%20%20%20seq.className%3D%22indent%22%3B%20%0D%0A%20%20%20%20curRe.appendChild(seq)%3B%20%0D%0A%20%20%20%20curRe%3Dseq%3B%20%0D%0A%20%20%20%20lastState%3D%22%5Cr%5Cn%22%3B%20%0D%0A%20%20%20%20if(i-glbP%3E200)%7B%20%0D%0A%20%20%20%20%20glbP%3Di%2B1%3B%20%0D%0A%20%20%20%20%20glbTimer%3DsetTimeout(core_analysis)%3B%20%0D%0A%20%20%20%20%20return%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20case%20%22%7D%22%3A%20%0D%0A%20%20%20%20outputLn(str.substring(0%2Cstr.length-1))%3B%20%0D%0A%20%20%20%20str%3D%22%7D%20%22%3B%20%0D%0A%20%20%20%20lastState%3D%22%22%3B%20%0D%0A%20%20%20%20curRe%3DcurRe.parentNode%3B%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%20default%3A%20%0D%0A%20%20%20%20if(c.match(%2F%5Cw%2F)%26%26glbStr.charAt(i-1).match(%2F%5CW%2F))%7BintWordStart%3Di%3B%7D%20%0D%0A%20%20%20%20if(c.match(%2F%5CW%2F)%26%26glbStr.charAt(i-1).match(%2F%5Cw%2F))%7B%20%0D%0A%20%20%20%20%20str%3Dstr.substring(0%2Cstr.length-htmlEncode(c).length)%3B%20%0D%0A%20%20%20%20%20str%3Dstr.replace(regKW%2CclKW).replace(regObj%2CclObj).replace(regMP%2CclMP)%2BhtmlEncode(c)%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20lastState%3D%22%22%3B%20%0D%0A%20%20%20break%3B%20%0D%0A%20%20%7D%20%0D%0A%20%7D%20%0D%0A%20%20%0D%0A%20if(i%3D%3DglbStr.length)%7B%20%0D%0A%20%20if(str!%3D%22%22)%7B%20outputLn(str)%3B%20str%3D%22%20%22%3B%20%7D%20%0D%0A%20%20stopExec()%3B%20%0D%0A%20%7D%20%0D%0A%0D%0A%7D%20%0D%0A%0D%0Afunction%20outputLn(theStr)%7B%20%0D%0A%20var%20seq%3Ddocument.createElement(%22p%22)%3B%20%0D%0A%20seq.innerHTML%3DtheStr%3B%20%0D%0A%20curRe.appendChild(seq)%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20clKW(str)%7B%20return(str.charAt(0)%2Bstr.substring(1).fontcolor(colorKW))%3B%20%7D%20%0D%0A%0D%0Afunction%20clObj(str)%7B%20return(str.charAt(0)%2Bstr.substring(1).fontcolor(colorObj))%3B%20%7D%20%0D%0A%0D%0Afunction%20clMP(str)%7B%20return(str.charAt(0)%2Bstr.substring(1).fontcolor(colorMP))%3B%20%7D%20%0D%0A%0D%0Afunction%20clOP(str)%7B%20return(str.charAt(0)%2Bstr.substring(1).fontcolor(colorOP))%3B%20%7D%20%0D%0A%0D%0A%0D%0A%2F%2F------------------%20%0D%0A%2F%2F%20global%20scripts%20%0D%0A%2F%2F------------------%20%0D%0A%0D%0Afunction%20maximizeWindow()%7B%20%0D%0A%20window.moveTo(0%2C0)%3B%20%0D%0A%20window.resizeTo(screen.availWidth%2Cscreen.availHeight)%3B%20%0D%0A%7D%20%0D%0A%0D%0Afunction%20htmlEncode(strS)%7B%20%0D%0A%20return(strS.replace(%2F%26%2Fg%2C%22%26amp%3B%22).replace(%2F%3C%2Fg%2C%22%26lt%3B%22).replace(%2F%3E%2Fg%2C%22%26gt%3B%22).replace(%2F%20%2Fg%2C%22%26nbsp%3B%22).replace(%2F%5Cr%5Cn%2Fg%2C%22%3Cbr%5C%2F%3E%22))%3B%20%0D%0A%7D%20%0D%0A%3C%2Fscript%3E"> </head> <body> <div id="divTools"> <a href="#" _ewebeditor_ta_href="%23" onclick="return(showJSInput());">Input JS</a> </div> <div id="divJSInput"> <div id="divJSInputTitle">Please Input the JS:</div> <textarea id="txtJSInput"></textarea> <div id="divJSInputBar"> <input type="button" value="OK" onclick="execJSInput();" /> <input type="button" value="Cancel" onclick="hideJSInput();" /> </div> </div> <div id="divJSOutput"></div> <div id="divWaiting"> Processing...<span id="spnProcess"></span> <input type="button" value="Stop" onclick="stopExec();" /> </div> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程