我想写一个htm,用于普通解密十进制加密类型把t取为变量
<script>
vart="......."
给t赋值比如67+13,1633/23,26+78,42+6,8526/87,97-10,34+85,10+33,3600/45,70+1,58+16,6018/51,148-58,4+68,150-43,70-27,11+57,6318/78,77+34,74-18,103-14,44+66,6450/75,11+37,18+82,4331/61,90-33,157-40,124-51,102-31,155-47,177-70,159-79,11+72,169-69,103-33,6060/60,182-75,42+32,11+93,107-21,1440/20,132/2,0+97,5832/72,16+70,110-36,20+31,83+7,29+80,2052/36,139-52,123-26,146-59,2451/43,6+91,2050/25,155-68
需要计算后的十进制
我就是想的,编写一个htm文件,直接把值拖入t中
最后用一个alert直接计算出,请问该怎么做,谢谢

解决方案 »

  1.   

    楼主这个alert不是主要的,主要的你要找解密的那段代码,或者插件
      

  2.   

    楼主是不是要下面这个,可以粘贴一段文本,用逗号分隔的一组表达式,然后点一下计算按钮可以得出结果<textarea id="text1" rows=10 cols=80>67+13,1633/23,26+78,42+6,8526/87,97-10,34+85,10+33,3600/45,70+1,58+16,6018/51,148-58,4+68,150-43,70-27,11+57,6318/78,77+34,74-18,103-14,44+66,6450/75,11+37,18+82,4331/61,90-33,157-40,124-51,102-31,155-47,177-70,159-79,11+72,169-69,103-33,6060/60,182-75,42+32,11+93,107-21,1440/20,132/2,0+97,5832/72,16+70,110-36,20+31,83+7,29+80,2052/36,139-52,123-26,146-59,2451/43,6+91,2050/25,155-68</textarea>
    <br><input type=button value=" 计算 " onclick="f()"><script>
    String.prototype.trim=function(){
       return this.replace(/(^\s*)|(\s*$)/g, "");
    }function f(){
      var s="";
      var t=text1.value;
      var ts=t.split(",");
      for(var i=0;i<ts.length;i++){
        t=ts[i].trim();
        s=s+eval(t)+",";
      }
      alert(s);
    }</script>
      

  3.   

    <textarea id="text1" rows=10 cols=80>67+13,1633/23,26+78,42+6,8526/87,97-10,34+85,10+33,3600/45,70+1,58+16,6018/51,148-58,4+68,150-43,70-27,11+57,6318/78,77+34,74-18,103-14,44+66,6450/75,11+37,18+82,4331/61,90-33,157-40,124-51,102-31,155-47,177-70,159-79,11+72,169-69,103-33,6060/60,182-75,42+32,11+93,107-21,1440/20,132/2,0+97,5832/72,16+70,110-36,20+31,83+7,29+80,2052/36,139-52,123-26,146-59,2451/43,6+91,2050/25,155-68</textarea>
    <br><input type=button value=" 计算 " onclick="f()"><script>
    String.prototype.trim=function(){
    return this.replace(/(^\s*)|(\s*$)/g, "");
    }function f(){
    var s="";
    var t=text1.value;
    var ts=t.split(",");
    for(var i=0;i<ts.length;i++){
    t=ts[i].trim();
    s=s+eval(t)+",";
    }
    alert(s);
    }</script>
      

  4.   

    try plz:<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script type=text/javascript>
    function $(o, t, f){
             return "string" == typeof o ? document.getElementById(o) || o : "function" == typeof o ? (window.onload = o) :  
                    "object" == typeof o ? function(o, t, f){o.attachEvent ? o.attachEvent('on'+t, function(){f.call(o)}) : 
                     o.addEventListener(t, f, !1)}(o, t, f) : null;
    }
    $(function(){
             $($("show"),"click",function(e){
                     var result = "", reg = /[^,|^]+(?=,|$)/g;
                     var str = $("text").value||"35831,22312,25991,26412,26694,20013,36755,20837,23494,25991,32,65281";
                     str = str.replace(reg, function(o){return eval(o)});
                     var arr = str.match(reg);
                     for (var i=0; !!arr[i]; i++)
                     result += String.fromCharCode(arr[i]);
                     alert(result);
             })
    })
    </script><textarea id="text" style="width:500px;height:500px;"></textarea></br>
    <input id="show" type="button" value="Decrypt">
      

  5.   

    再简化:<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script type=text/javascript>
    function $(o, t, f){
             return "string" == typeof o ? document.getElementById(o) || o : "function" == typeof o ? (window.onload = o) :  
                    "object" == typeof o ? function(o, t, f){o.attachEvent ? o.attachEvent('on'+t, function(){f.call(o)}) : 
                     o.addEventListener(t, f, !1)}(o, t, f) : null;
    }
    $(function(){
             $($("show"),"click",function(e){
                     var reg = /[^,|^]+(?=,|$)/g;
                     var str = $("text").value||"35831,22312,25991,26412,26694,20013,36755,20837,23494,25991,32,65281";
                     str = str.replace(reg, function(o){return String.fromCharCode(eval(o))}).replace(/,/g,"");
                     alert(str);
             })
    })
    </script><textarea id="text" style="width:500px;height:500px;"></textarea></br>
    <input id="show" type="button" value="Decrypt">或者干脆:<script>alert(
    "67+13,1633/23,26+78,42+6,8526/87,97-10,34+85,10+33,3600/45,70+1,58+16,6018/51,148-58,4+68,150-43,70-27,11+57,6318/78,77+34,74-18,103-14,44+66,6450/75,11+37,18+82,4331/61,90-33,157-40,124-51,102-31,155-47,177-70,159-79,11+72,169-69,103-33,6060/60,182-75,42+32,11+93,107-21,1440/20,132/2,0+97,5832/72,16+70,110-36,20+31,83+7,29+80,2052/36,139-52,123-26,146-59,2451/43,6+91,2050/25,155-68".replace(/[^,|^]+(?=,|$)/g, function(o){return String.fromCharCode(eval(o))}).replace(/,/g,"")
    )</script>