หากมี AJAX ให้ตั้งค่า
Async: FALSE, // AJAX สามารถซิงโครไนซ์ var countDownInterval; /*ยืนยันการเติมเงินทันที*/ ฟังก์ชั่น torecharge () {var paramdata = วัตถุใหม่ (); paramdata.payType = 1; // การชำระเงิน Alipay paramdata.orderMoney = parsefloat ($ ("#spshouldpay"). text ()); // จำนวนเงินทั้งหมด var gprstel = []; var orderDetail = new Array (); สำหรับ (var i = 0; i <devicelist.length; i ++) {orderdetail [i] = วัตถุใหม่ (); orderdetail [i] .devicesn = devicelist [i] .devicesn; // อุปกรณ์ sn รหัส orderdetail [i] .gprstel = devicelist [i] .gprstel; // gprs หมายเลขโทรศัพท์มือถือ 100; // ค่าเริ่มต้นคือ 200 หยวน gprstel.push (devicelist [i] .gprstel); } paramdata.gprstel = gprstel.join (","); paramdata.orderDetail = $ .tojson (orderDetail); paramdata.rand = math.random (); paramdata.postType = "addRecharge"; $ .ajax ({url: '/App_ajax/service.ashx', ข้อมูล: paramdata, ประเภท: 'โพสต์', async: false, // สร้างความสำเร็จของ Ajax synchronous: function (resultdata) {var jsonresult = $ .parsejson "การเติมเงินล้มเหลวในการบันทึก!"); $ ("#hdnorderstatus") Val (jsonresult.obj.orderstatus); //window.open("http://www.baidu.com "); - /*โพสต์เปิดหน้าต่างใหม่*/ ฟังก์ชั่น OpenPostWindow (URL, ข้อมูล, เป้าหมาย) {var tempform = document.createElement ("ฟอร์ม"); tempform.id = "tempform1"; tempform.method = "โพสต์"; tempform.action = url; tempform.target = เป้าหมาย; var hideInput = document.createElement ("อินพุต"); hideInput.type = "ซ่อน"; hideInput.name = "postname" hideInput.value = ข้อมูล; tempform.appendchild (hideInput); document.body.appendchild (tempform); tempform.submit (); document.body.removechild (tempform); -