我如何使用jQuery发布此表单? [关闭]

I have the form all set up exactly as demo here: http://www.alessioatzeni.com/wp-content/tutorials/jquery/login-box-modal-dialog-window/index.html But I have no idea how to post the username and password in order to be processed by my jQuery. Can someone help me out?

You should post the specific code you are having trouble with, but I think this will help:

$(document).on('click', '.submit.button', function () {
    $.post('/signin', $(this).closest('form').serialize(), function (data) {
        //check success or failure
    });
});

Hope this will help you. Much easier because you only have 2 fields. Thanks

jQuery('.submit.button').click(function(){ 
 var username = jQuery(this).find('#username').val(); 
 var password = jQuery(this).find('#password').val(); 

 jQuery.ajax({
    url: "login.php",
    data:{username:username, password: password},
    type: "post",
    success: function(html) {
           //add success function here
    },
    error: function(html) {
       //add error login here
},
    statusCode: {
     404: function() {
       //404 here
     }
    }
});

});

Cheers!