Window.Open如何在同一個(gè)標(biāo)簽頁(yè)打開(kāi)
來(lái)源:易賢網(wǎng) 閱讀:2082 次 日期:2014-07-17 19:15:20
溫馨提示:易賢網(wǎng)小編為您整理了“Window.Open如何在同一個(gè)標(biāo)簽頁(yè)打開(kāi)”,方便廣大網(wǎng)友查閱!

這篇文章主要介紹了Window.Open如何在同一個(gè)標(biāo)簽頁(yè)打開(kāi),需要的朋友可以參考下。

如果有Ajax,那么設(shè)置

async:false,//使AJax同步

var countdownInterval;

/*確認(rèn)立即充值*/

function ToRecharge(){

var paramData = new Object();

paramData.PayType = 1;//支付寶支付

paramData.OrderMoney = parseFloat($("#spShouldPay").text());//支付總金額

var gprsTel = [];

var orderDetail = new Array();

for(var i = 0; i < deviceList.length; i++){

orderDetail[i] = new Object();

orderDetail[i].DeviceSN = deviceList[i].DeviceSN;//設(shè)備SN碼

orderDetail[i].GPRSTel = deviceList[i].GPRSTel;//GPRS手機(jī)號(hào)碼

orderDetail[i].PayYear = parseInt($("#hdnYear").val());//年數(shù)

orderDetail[i].PayPotency = 100;//暫時(shí)默認(rèn)是兩百元

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',

data: paramData,

type: 'post',

async:false,//使AJax同步

success: function(resultData){

var jsonResult = $.parseJSON(resultData);

if(!jsonResult.success){

window.$.messager.alert('提示', "充值記錄保存失敗!");

newwindow.close();

return;

}

$("#backupdate").text("返回修改");

$("#timerecharge").hide();

$("#onrecharge").show();

$("#rechargesuccess").hide();

$("#hdnOrderStatus").val(jsonResult.obj.OrderStatus);

$("#hdnOID").val(jsonResult.obj.OID);

//啟動(dòng)一個(gè)輪詢,不斷去讀取Recharge_Order表的OrderStatus如果成功那么就停止

CheckOrderStatus(jsonResult.obj.OID);

//window.open("http://www.baidu.com");

openPostWindow(String.format("http://{0}/Default/Service/Recharge.aspx", location.host), $.toJSON(jsonResult.obj), "_blank")

}

});

}/*POST 打開(kāi)新窗口*/

function openPostWindow(url, data, target) {

var tempForm = document.createElement("form");

tempForm.id = "tempForm1";

tempForm.method = "post";

tempForm.action = url;

tempForm.target = target;

var hideInput = document.createElement("input");

hideInput.type="hidden";

hideInput.name= "PostName"

hideInput.value= data;

tempForm.appendChild(hideInput);

document.body.appendChild(tempForm);

tempForm.submit();

document.body.removeChild(tempForm);

}

更多信息請(qǐng)查看IT技術(shù)專欄

更多信息請(qǐng)查看網(wǎng)絡(luò)編程
易賢網(wǎng)手機(jī)網(wǎng)站地址:Window.Open如何在同一個(gè)標(biāo)簽頁(yè)打開(kāi)
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

2025國(guó)考·省考課程試聽(tīng)報(bào)名

  • 報(bào)班類型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢 | 簡(jiǎn)要咨詢須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專用圖標(biāo)
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號(hào):hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專用圖標(biāo)