ASP vbs 代码大小写规范
ASP vbs 代码大小写规范-我们
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需刷新才能执行]