ajax提交调用有什么问题?

what is worng in ajaxSubmit calling?

$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 请求,你看到它有什么问题吗?

您忘记了 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){}
    });
};