简体   繁体   中英

Call ajaxform with function button

Are there a way to call a ajaxform from malsup with a function?

like this:

function callAjaxForm(id){

    $('#' + id).ajaxForm({
    ....
    });
 }

When I do such thing nothing happen...

edited: I already try with a function like this:

function callAjaxForm(id){
    (function() {

        $('#' + id).ajaxForm({
        ....
        });
     })();
 }

thanks

Are there a way to call a ajaxform from malsup with a function?

There's no reason why you shouldn't be able to

like this:

The documentation shows that the method takes a function as an argument, not a plain object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM