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

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

function hideJSInput(){  divJSInput.style.display="none"; }
function hideJSExport(){  divJSExport.style.display="none"; }
function execJSInput(){  hideJSInput
();    divJSOutput.innerHTML="";  divJSOutputLineNo.innerHTML=""
;;  divJSOutputPlus.innerHTML="";    glbStr=txtJSInput.value; &n
bsp;glbP=0;  glbFuntionNames=new Array();  curRe=glbRe=document.createElement
("div");    divJSOutput.appendChild
(glbRe);  glbRe.className="codeRoot";    while
(selJSExport.options.length>0)selJSExport.options[0]=null;    showWait
(startRecalcLine);  core_analysis(); } function execJSExport()
{  var fns=new Array(), fcs=new Array(), str;    for
(var i=0; i<selJSExport.options.length; i++){   if(selJSExport.options[i].selected)
{    fns.push(selJSExport.options[i].value);    str=selJSExport.options
[i].obj.outerHTML;    try{     str+=selJSExport.options
[i].obj.nextSibling.outerHTML;     str+=selJSExport.options
[i].obj.nextSibling.nextSibling.outerHTML;    }catch(e){}    fcs.push
(str);   }  }  if(fns.length==0)
return;    divJSExportContent.style.display="block";  selJSExport.style.d
isplay="none";    divJSExportContent.innerHTML=fcs.join
("rn<br>rn"); } function execJSExport_Dep()
{  var fns=new Array(), fcs=new Array(), str, regFNs=new Array
(), needDepthTest;    for(var i=0; i<selJSExport.options.length; i++)
{   if(selJSExport.options[i].selected){    fns.push(selJSExport.options
[i].value);    try{     str=selJSExport.options
[i].obj.nextSibling.outerHTML;    }catch(e){}    fcs.push
(str);   }  }  if(fns.length==0)
return;    divJSExportContent.style.display="none";  selJSExport.style.di
splay="block";    needDepthTest=false;  for