jquery ajax data shows [object Object]

前端 未结 3 513
旧时难觅i
旧时难觅i 2020-12-15 04:28

I have a very basic ajax call to alert the data that was reported from the server

$.ajax({
       type: \"POST\",
       url: \"/someform/act\", //edit utl t         


        
3条回答
  •  [愿得一人]
    2020-12-15 04:52

    You need to use JSON.stringify(data) in the alert to get anything readable.

    Also, $data is a completely different variable name than data.

提交回复
热议问题