weixin_33682719 2016-06-13 21:43
浏览 265

$ .ajax()数据参数顺序

Let's say my model looks like this:

public class someModel{
    public int age {get; set;}
    public string affiliation {get;set;}
    public string name {get;set;}
}

And when I post from form someForm:

var request;
$('someForm').submit(function (event) {
        if (request) {
            request.abort();
        }
        request = $.ajax({
            url: '/Home/addRecordResult',
            data: {
                affiliation: $('#affInput').val(),
                name: $('#nameInput').val(),
                age:$('#ageInput').val()
            },
            type: 'POST'
        });

in the data parameter in the Ajax method, does the order of inputs matter? Does it always have to be age then affiliation then name?

  • 写回答

1条回答 默认 最新

  • weixin_33743880 2016-06-13 21:47
    关注

    I would say "no", it doesn't matter

    评论

报告相同问题?