ajax 发送的数据,默认都是字符串,不能直接传递list(列表),或者dict(字典)。

若要 传递list(列表),或者dict(字典),需要进行一些操作。

list 需要进行列表序列化,在ajax下添加参数 tradiction :true

dict 若要序列化的话,需要使用 JSON.stringfy("{"one": 123}"), 这样的形式进行转化,在后台中就需要对获取到的字符串进行 反序列化(取出其对象)

 

相关文章:

  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-02-10
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2021-12-19
  • 2022-12-23
  • 2021-10-01
  • 2021-09-08
相关资源
相似解决方案