SOURCE

console 命令行工具 X clear

                    
>
console
//解密
function decode()
{
  // 获取文本框中的字符串
  // 例如: 96,97,98
  var str = secret.value;
  // 思路:
  // 1. 按照 , 分割字符串
  // 2. 将每个 分割的子字符串 转换成 数字,再转换成 字符
  //   96 97 98
  // 3. 将还原的字符,拼接在一起,再设置到 input 中去
  var arr = str.split(",");
  // 用于拼接结果的
  var r = "";
  for (var i = 0; i < arr.length; i++)
  {
    // 获取加密后的 字符串的编码,是一个数字
    var code = parseInt(arr[i]);
    r += String.fromCharCode(code);
  }
  // 将拼接后的结果,设置到 input 中
  secret.value = r;
}
<body>
      <div class="top" style="height:70px;border-bottom:1px solid #ddd;">
<img class="logoIndex" height="60" src="https://www.zenitour.com/img/logoIndex.png" style="margin-left:10px;margin-top:5px;">
</div>
   <div class="content" style="text-align:center;margin-top:50px;height: 78%;">
 <h1> 解密 </h1>
 <input type="text" id="secret" /> 
<input type="button" value="解密" onclick="decode();">
  </div>
      <div id="bottom" style="text-align:center;border-top:1px solid #ddd;">
<span class="centerspan" style="font-size:10px">Copyright © 2017 Zenitour lnc All Rights Reserved 版权所有-哲途教育  渝ICP备13002955号-2</span>
</body>
   html,body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }