Home  >  Q&A  >  body text

javascript - easyui表单提交问题?

将一个表单的数据提交到后台,但是用浏览器调试,说的是请求错误 ,我直接用同样的请求直接在地址栏是能正常返回数据的。以下是前端js代码和后台测试代码

因为是才接触easyui 感觉有点老火 网上找了一个 差不多是这样的,但是还是报错
下面是chrom调试图片

阿神阿神2743 days ago859

reply all(5)I'll reply

  • 大家讲道理

    大家讲道理2017-04-18 10:56:23

    When using spring in the background, a 400 error occurs. Generally, there is an error in the action parameter injected by springmvc. Generally speaking, the data type does not match. For example, if your User has a property that is of numeric type, but you passed in an attribute that cannot be converted into a number. If there is any problem with obtaining the string value you passed in the background, or check the parameters in the debugging tool

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:56:23

    Debug the backend, or take a screenshot of the headers to see what is being transmitted

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:56:23

    You can try to serialize the form and send it using ajax. . . .

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:56:23

    Looks like a grammatical error. But still take a screenshot. Or make a breakpoint and see for yourself.

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:56:23

    Because the data I submitted is related data, it was a bit troublesome. There was a wrong name attribute in the data submitted by my easyui form, which caused a syntax error

    reply
    0
  • Cancelreply