简单JS代码压缩器

2019-06-03 18:43:24于海丽

<!--
/**//**//**//** 
**    ==================================================================================================  
**    类名:CLASS_FORMATER
**    功能:JS格式化  
**    示例:  
   ---------------------------------------------------------------------------------------------------  

           var xx        = new CLASS_FORMATER(code);            

           document.getElementById("display").innerHTML = xx.format(); 

   ---------------------------------------------------------------------------------------------------  
**    作者:ttyp  
**    邮件:<a href="mailto:ttyp@21cn.com">ttyp@21cn.com</a>  
**    日期:2006-5-21  
**    版本:0.1
**    ==================================================================================================  
**/  

function CLASS_FORMAT(code){
   //哈希表类
   function Hashtable(){
       this._hash        = new Object();
       this.add        = function(key,value){
                           if(typeof(key)!="undefined"){
                               if(this.contains(key)==false){
                                   this._hash[key]=typeof(value)=="undefined"?null:value;
                                   return true;
                               } else {
                                   return false;