dzLib.js
|
Color syntax javascript-code | |
Description: Usage://Divide operator now works var a = 20; var b = a / 100; var c = "b"; //Server-side (no Server.HTMLEncode needed!) Response.Write(parseJSCode(strJavascript,false)); //Client-side (including line-numbers) document.getElementById('divCode').innerHTML=parseJSCode(strJavascript,true); //Highlight all PRE tags with CLASS "JS" and CLASS "JSnr" with linenumbers hiLiteJS('JS'); hiLiteJS('JSnr',true): //Regular expressions and numbers also work var re=[/^0x[0-9a-f]$/i, /^#(.*?)$/gm, /function(\s*[a-z_$][a-z0-9_$}*){0,1}\(.*?\)/i]; var nHex=[0xF, 0Xff80, 0xF8D7]; var nWholeNumbers=[0, 12, 20, 142323, 12., +12, -13]; var nFractions=[.12, 0.312, 0.1434241]; var nExponents=[12e132, 1E+12, 10e-12, 10.12e2];]]> DemoHistory
Planned options
|