Jquery
.submit()
函数在.ajax()
函数后无法正常工作
的 CODE:
if ($("#NetBanxFormTag").attr("action") != "") {
AddOdemeLog($("#<%=TxtCC.ClientID %>").val(),MusteriAdSoyad,$("#<%=HFDrm.ClientID %>").val(), $("#<%=HFbnk.ClientID %>").val(),$("#<%=Txtccname.ClientID %>").val());
$("#NetBanxFormTag").submit();
}
function AddOdemeLog(param3, param4, param5, param6, param7) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: '<%=ResolveUrl("~//lokasyon.asmx/ODEMELOG") %>',
data: "{'param1':'<%= VAR_SID %>','param2':'<%= VAR_DID %>','param3':'" + param3 + "','param4':'" + param4 + "','param5':'" + param5 + "','param6':'" + param6 + "','param7':'" + param7 + "'}",
dataType: "json",
async: false,
success: function (data) {
var SONUC = data.d;
$.session.set('JqSes_LogID', SONUC);
}
});
此代码在桌面浏览器上正常工作,但不适用于移动浏览器(iphone safari,chrome等)
答案 0 :(得分:0)
试试这个
if ($("#NetBanxFormTag").attr("action") != "") {
AddOdemeLog($("#<%=TxtCC.ClientID %>").val(),MusteriAdSoyad,$("#<%=HFDrm.ClientID %>").val(), $("#<%=HFbnk.ClientID %>").val(),$("#<%=Txtccname.ClientID %>").val());
$("#NetBanxFormTag").submit();
}
function AddOdemeLog(param3, param4, param5, param6, param7) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: '<%=ResolveUrl("~//lokasyon.asmx/ODEMELOG") %>',
data: "{'param1':'<%= VAR_SID %>','param2':'<%= VAR_DID %>','param3':'" + param3 + "','param4':'" + param4 + "','param5':'" + param5 + "','param6':'" + param6 + "','param7':'" + param7 + "'}",
dataType: "json",
async: false,
success: function (data) {
var SONUC = data.d;
$.session.set('JqSes_LogID', SONUC);
}
}).done(function(){
$("#NetBanxFormTag").submit();
});