我收到了这个错误,我不知道这是什么原因。
是不是因为有很多 FOR LOOP 我正在使用?
$("#frmNew").on("submit",function()
{
branch = $("#sel-branch");
comp = $("#sel-comp");
custCode = new Array(); for (i = 0; i < $(".custCode").length; i++){ custCode.push( $(".custCode").val() ); }
recipient = new Array(); for (i = 0; i < $(".recipient").length; i++){ recipient.push( $(".recipient").val() ); }
designation = new Array(); for (i = 0; i < $(".designation").length; i++){ designation.push( $(".designation").val() ); }
particulars = new Array(); for (i = 0; i < $(".particulars").length; i++){ particulars.push( $(".particulars").val() ); }
faIndividual = new Array(); for (i = 0; i < $(".faIndividual").length; i++){ faIndividual.push( $(".faIndividual").val() ); }
faSchool = new Array(); for (i = 0; i < $(".faSchool").length; i++){ faSchool.push( $(".faSchool").val() ); }
cgAppliances = new Array(); for (i = 0; i < $(".cgAppliances").length; i++){ cgAppliances.push( $(".cgAppliances").val() ); }
cgRepresentation = new Array(); for (i = 0; i < $(".cgRepresentation").length; i++){ cgRepresentation.push( $(".cgRepresentation").val() ); }
cgGadgets = new Array(); for (i = 0; i < $(".cgGadgets").length; i++){ cgGadgets.push( $(".cgGadgets").val() ); }
cgFurnFix = new Array(); for (i = 0; i < $(".cgFurnFix").length; i++){ cgFurnFix.push( $(".cgFurnFix").val() ); }
cgAccessories = new Array(); for (i = 0; i < $(".cgAccessories").length; i++){ cgAccessories.push( $(".cgAccessories").val() ); }
cgTranspo = new Array(); for (i = 0; i < $(".cgTranspo").length; i++){ cgTranspo.push( $(".cgTranspo").val() ); }
cgOthers = new Array(); for (i = 0; i < $(".cgOthers").length; i++){ cgOthers.push( $(".cgOthers").val() ); }
ciIndividual = new Array(); for (i = 0; i < $(".ciIndividual").length; i++){ ciIndividual.push( $(".ciIndividual").val() ); }
ciSchool = new Array(); for (i = 0; i < $(".ciSchool").length; i++){ ciSchool.push( $(".ciSchool").val() ); }
graceSOP = new Array(); for (i = 0; i < $(".graceSOP").length; i++){ graceSOP.push( $(".graceSOP").val() ); }
preparedBy = $(".preparedBy").val();
agent = $(".sel-agent").val();
noted = $(".sel-noted").val();
approved = $(".sel-approved").val();
$.post( base_url + "TDF/newTransaction",
{
branch:branch,
comp:comp,
custCode:custCode,
recipient:recipient,
designation:designation,
particulars:particulars,
faIndividual:faIndividual,
faSchool:faSchool,
cgAppliances:cgAppliances,
cgRepresentation:cgRepresentation,
cgGadgets:cgGadgets,
cgFurnFix:cgFurnFix,
cgAccessories:cgAccessories,
cgTranspo:cgTranspo,
cgOthers:cgOthers,
ciIndividual:ciIndividual,
ciSchool:ciSchool,
graceSOP:graceSOP,
preparedBy:preparedBy,
agent:agent,
noted:noted,
approved:approved
},function(data)
{
alert( "success" );
})
return false;
});
这是我第一次遇到这个错误。请让我知道如何摆脱这个,谢谢。