JS代码格式化和语法着色V2

2019-06-03 18:16:39王旭



//------------------
// Static Variable
//------------------

var KEYWORDS="abstract break byte case catch char class const continue default delete do double else extends false final 
finally float for function goto if implements import in instanceof int interface long native null package private protected 
public reset return short static super switch synchronized this throw transient true try var void while with";
var OBJECTS="Anchor Applet Area Arguments Array Boolean Button Checkbox Collection Crypto Date Dictionary Document Drive 
Drives Element Enumerator Event File FileObject FileSystemObject FileUpload Folder Folders Form Frame Function Global Hidden 
History HTMLElement Image Infinity Input JavaArray JavaClass JavaObject JavaPackage JSObject Layer Link Math MimeType 
Navigator Number Object Option Packages Password Plugin PrivilegeManager Random RegExp Screen Select String Submit Text 
Textarea URL VBArray Window WScript";
var METHODS_PROPERTIES="above abs acos action activeElement alert alinkColor all altKey anchor anchors appCodeName applets 
apply appName appVersion arguments arity asin assign atan atan2 atob  availHeight availLeft availTop availWidth ActiveXObject 
back background below bgColor big blink blur bold border borderWidths bottom btoa button call callee caller cancelBubble 
captureEvents ceil charAt charCodeAt charset checked children classes className clear clearInterval clearTimeout click 
clientInformation  clientX clientY close closed colorDepth compile complete concat confirm constructir contains contextual 
cookie cos crypto ctrlKey current data defaultCharset defaultChecked defaultSelected defaultStatus defaultValue description 
disableExternalCapture disablePrivilege document domain E Echo  element elements embeds enabledPlugin enableExternalCapture 
enablePrivilege encoding escape eval event exec exp expando FromPoint fgColor fileName find fixed floor focus fontColor