天天看點

ajax送出form表單 js

function sub()

{

    $.ajax({

        cache: true,

        type: "POST",

        url:url,

        data:$("form[name='form']").serialize(),//隻要将表單序列化就可以了

        async: false,

        error: function(request) {

            alert("Connection error");

        },

        success: function(data) {

            window.close();

        }

    });

}

php