function aspvbs() { var ss=document.getelementbyid("aspvbs").value; var vbs0="函数关键字|function|sub|"; var vbs1="保留关键字|and|as|byref|call|case|class|const|dim|do|each|else|elseif|empty|end|eqv|erase|execute|executeglobal|exit|explicit|false|for|get|goto|if|imp|in|is|let|loop|mod|next|not|nothing|null|on|option|or|private|public|randomize|redim|rem|resume|select|set|stop|then|to|true|until|wend|while|with|xor|"; var vbs2="本机关键字|abandon|abs|absolutepage|absoluteposition|activeconnection|actualsize|addheader|addnew|appendchunk|appendtolog|application|application_onend|application_onstart|array|asc|atn|attributes|begintrans|binaryread|binarywrite|bof|bookmark|boolean|buffer|cachecontrol|cachesize|cancel|cancelbatch|cancelupdate|cbool|cbyte|ccur|cdate|cdbl|charset|chr|cint|clear|clientcertificate|clng|clone|close|codepage|command|commandtext|commandtimeout|commandtype|comparebookmarks|connection|connectionstring|connectiontimeout|contents|contenttype|cookies|cos|count|createparameter|createobject|csng|cstr|cursorlocation|cursortype|date|dateadd|datediff|datepart|dateserial|datevalue|day|defaultdatabase|definedsize|delete|description|dictionary|direction|editmode|eof|err|error|errors|eval|execute|exp|expires|expiresabsolute|field|fields|file|filesystem|filter|find|fix|flush|form|formatcurrency|formatdatetime|formatnumber|formatpercent|getchunk|getlocale|getobject|getref|getrows|getstring|helpcontext|helpfile|hex|hour|htmlencode|index|inputbox|instr|instrrev|int|integer|isarray|isclientconnected|isdate|isempty|isnull|isnumeric|isobject|isolationlevel|item|join|lbound|lcase|lcid|left|len|loadpicture|lock|locktype|log|ltrim|mappath|marshaloptions|match|mid|minute|mode|month|monthname|move|movefirst|movelast|movenext|moveprevious|msgbox|name|nativeerror|nextrecordset|now|number|numericscale|numericscale|objectcontext|oct|ontransactionabort|ontransactioncommit|open|openschema|originalvalue|pagecount|pagesize|parameter|parameters|pics|precision|prepared|properties|property|propertyget|propertylet|propertyset|provider|querystring|raise|recordcount|recordset|redirect|regexp|replace|requery|request|response|resync|rgb|right|rnd|rollbacktrans|round|rtrim|save|scriptengine|scriptenginebuildversion|scriptenginemajorversion|scriptengineminorversion|scripttimeout|second|seek|server|servervariables|session|session_onend|session_onstart|sessionid|setabort|setallrowstatus|setcomplete|setlocale|sgn|sin|size|sort|source|space|split|sqlstate|sqr|state|staticobjects|status|strcomp|string|strreverse|supports|tan|test|time|timeout|timer|timeserial|timevalue|totalbytes|trim|type|typename|ubound|ucase|underlyingvalue|unlock|update|updatebatch|urlencode|urlpathencode|value|vartype|version|weekday|weekdayname|write|year|"; var vbs3="常量|vbarray|vbbinarycompare|vbblack|vbboolean|vbblue|vbbyte|vbcr|vbcrlf|vbcurrency|vbcyan|vbdataobject|vbdate|vbdecimal|vbempty|vberror|vbfalse|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbformfeed|vbfriday|vbgeneraldate|vbgreen|vbinteger|vblf|vblong|vblongdate|vblongtime|vbmagenta|vbmonday|vbnewline|vbnull|vbnullchar|vbnullstring|vbobject|vbobjecterror|vbred|vbsaturday|vbshortdate|vbshorttime|vbsingle|vbstring|vbsunday|vbtab|vbtextcompare|vbthursday|vbtrue|vbtuesday|vbusedefault|vbusesystem|vbusesystemdayofweek|vbvariant|vbverticaltab|vbwednesday|vbwhite|vbyellow|"; //原则上s应该是"|str1|str2|" s=vbs0+vbs1+vbs2+vbs3; function re_aspvbs(a, b) { var re = new regexp("\|("+ b +")\|", "ig"); if(re.test(s)) return regexp.$1; else return b; } var re = /b(w+)b/g; ss = ss.replace(re, re_aspvbs); document.getelementbyid("show").value=ss; }
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!