ajax提交数组注意事项

李永毅 2020-04-07

$.ajax({
                    datatype:‘json‘,
                    type:"post",

                    url:"/test/doTest.do",
                    traditional: true,//如果传值有数组,需要写
                    data:{
                        "timeConsumes":sumtime,
                       "answers" :checkans,
                    },
                    success: function(json){
                        Test_result(json.data)



                    },error:function(xhr){alert(xhr.responseText)}
                });

相关推荐

mmywcoco / 0评论 2020-06-06