DIV CSS 佈局教程網

訓練題(1)線上 escape 加解密工具
編輯:JavaScript基礎知識     

製作簡易加解密工具

利用 escape() 與 unescape(),可以製作簡單的編碼與解碼工具。

function encrypt() {
  var str = document.getElementById("txt-input").value;
  document.getElementById("txt-output").value = escape(str);
}

介面可加上輸入框、加密、解密與清空按鈕,再搭配表單事件即可完成。

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved