Unicode与中文的转换-javascript

        var classObj=
             {
               ToUnicode:function(str) 
               {
                return escape(str).replace(/%/g,"\\").toLowerCase();
               },
               UnUnicode:function(str)
               {
                return unescape(str.replace(/\\/g, "%"));
               },
              copyingTxt:function(str)
              {
               document.getElementById(str).select(); 
               document.execCommand("Copy"); 
              }
            };

相当有用,java的转换

posted on 2016-11-24 10:01  江湖吹风  阅读(206)  评论(0编辑  收藏  举报

renzku