JavaScript 入門指南 - encryptdemo.html




encryptdemo.html 的程式原始碼如下

<html>
<head>
<title>Encrypt Demo</title>
<script language="JavaScript" src="encrypt.js"></script>
<script>
function run() {
    var e = new Encrypt();
    var d = document.getElementById("display");
    d.innerHTML += e.showCode() + "<br / >";
    var s1 = "There is no spoon.";
    d.innerHTML += "input: "+ s1 + "<br / >";
    var s2 = e.toEncode(s1);
    d.innerHTML += "encode: " + s2 + "<br / >";
    var s3 = e.toDecode(s2);
    d.innerHTML += "decode: " + s3 + "<br / >";
}
</script>
</head>
<body onload="run()">
<div id="display"></div>
</body>

<!-- 《程式語言教學誌》的範例程式
      http://pydoing.blogspot.com/
      檔名:encryptdemo.html
      功能:示範 JavaScript 程式
      作者:張凱慶
      時間:西元 2012 年 12 月 -->


您可以繼續參考
範例程式碼


相關目錄
回 JavaScript 入門指南
回 JavaScript 教材
回首頁


參考資料
http://www.ecma-international.org/publications/standards/Ecma-262.htm
http://www.w3schools.com/JS/default.asp
http://www.tutorialspoint.com/javascript/index.htm
http://www.w3.org/standards/techs/dom#w3c_all
https://developer.mozilla.org/en-US/docs/JavaScript
https://developer.mozilla.org/en/DOM
http://msdn.microsoft.com/en-us/ie/default
http://developer.apple.com/devcenter/safari/index.action
http://dev.chromium.org/
http://dev.opera.com/

沒有留言: