$scope.submitTheForm = function(htmlcode){
var idOfForm = "formOfCalCPDF";
var dataPassed = $.param({'htmlcode':htmlcode,'mode':'getpdf'});
alert("coming here");
$(idOfForm).ajaxSubmit({
url: 'ggs.erm.payrollJava.Taxsummary',
type: "POST",
data: dataPassed,
error:function (){},
success: function (data){}
});
};
当我调用此函数时,虽然正在执行警报,但没有POST请求,您是否看到任何类型的问题?
答案 0 :(得分:2)
您忘了id
选择器试试这个: -
$scope.submitTheForm = function(htmlcode){
var idOfForm = "formOfCalCPDF";
var dataPassed = $.param({'htmlcode':htmlcode,'mode':'getpdf'});
alert("coming here");
$('#'+idOfForm).ajaxSubmit({
url: 'ggs.erm.payrollJava.Taxsummary',
type: "POST",
data: dataPassed,
error:function (){},
success: function (data){}
});
};