大佬教程收集整理的这篇文章主要介绍了使用多个数组调用 Ajax 但没有获得函数调用,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用多个数组调用 AJAX,但在点击 ctl00_MainContenT_Btnsaveqfdmatrix 时没有得到函数调用,我在 AJAX 调用中传递数组 custreq,testpara,category,property1 值
$('#ctl00_MainContenT_Btnsaveqfdmatrix').click(function(E) {
e.preventDefault();
var custreq = [];
var testpara = [];
var category = [];
var property1 = [];
$("#Qfd td").each(function() {
if ($(this).hasClass("highlight1")) {
alert("check1");
cols = $(this).closest("tr").children("td").index($(this));
custreq[i++] = $(this).closest("tr").find("td").eq(0).HTML(); //colv
if ($(this).closest("tr").find("td").eq(1).hasClass("A")) {
custreq[i++] = $(this).closest("tr").find("td").eq(1).HTML(); //colv
} else {
cols = 1 + cols
}
testpara[i++] = $("#Qfd tr").eq(1).find("td").eq(cols).HTML(); //rowv
if (cols <= 6 && cols >= 1) {
categorY[i++] = 'Alloying';
}
if ($(this).hasClass("highlight1")) {
property1[i++] = "Red"
}
$.AJAX({
type: "POST",url: "Entry.aspx/mcall",data: {
'custreq': custreq,'testpara': testpara,'category': category,'property1': property1,'npdno': $("#ctl00_MainContent_lblnpdno").text()
},ContentType: "application/Json; charset=utf-8",dataType: "Json",success: function(data) {
alert("yes");
},error: function(responsE) {
alert(responsE);
}
});
});
在 vb .net 端调用 webmethod mcall 但给定的函数无法调用
<ScriptMethod(),WebMethod()>
Public Shared Function mcall(ByVal custreq As List(Of String),ByVal testpara As List(Of String),ByVal category As List(Of String),ByVal property1 As List(Of String),ByVal npdno As String) As String
Return "Hello "
End Function
任何错误的想法将不胜感激。
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的使用多个数组调用 Ajax 但没有获得函数调用全部内容,希望文章能够帮你解决使用多个数组调用 Ajax 但没有获得函数调用所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。