- prototype.js下載
- 在網頁的<head>之間加<script src="prototypejs" type="text/javascript"></script>
- 簡化表單欄位的存取($F())
- var account = $F("account");
- 或是 var account = f1.account.value;
-----------------------------------------------------
function makeRequest(){
var url, parm;
parm = Form.serialize("f1"); //將表單欄位轉成查詢字串
url = "login.jsp";
var myAjax = new Ajax.Request(url, {method:"post", parameter:parm, onComplete:alertContents});
}
沒有留言:
張貼留言