prototype Ajax提交

来源:互联网 发布:知乎周刊 下载 编辑:程序博客网 时间:2024/05/21 19:41

 

//Method 1.
var url = '/PropertyRight/reports30.do?method=putinExcel';
var form = Form.serialize('changeInfoID');
var myAjax = new Ajax.Request(url , {parameters:form,method:"post",onComplete:afterAdd});


//Method 2.
var pars = '&date=' + date + '&cqdw=' + cqdw + '&reportID=' + reportID;
var url = '/PropertyRight/reports30.do?method=putinExcel';
var myAjax = new Ajax.Request(url, {method: 'post',parameters: pars,  onComplete:afterAdd}); 

function afterAdd(){
     ........
}


<script type="text/javascript"><!--google_ad_client = "pub-1926348199765453";/* 728x90, 创建于 08-12-3 */google_ad_slot = "0385006797";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><script type="text/javascript"><!--google_ad_client = "pub-1926348199765453";/* 336x280, 创建于 08-12-3 */google_ad_slot = "6860128133";google_ad_width = 336;google_ad_height = 280;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>