weixin_33749131 2016-04-14 20:19 采纳率: 0%
浏览 36

FormData插入额外的TExt

I'm using form data in Javascript to send my inputs to the server but I noticed something funky. In Firefox and Chrome it sends back extra text along with the data and adds it to the original value. Here is an example of what chrome outputs

------WebKitFormBoundaryq5GElQTvd3mbU5qE--

Here is my code. I am doing a PUT request.

var formData = new FormData();
                formData.append('user','tester');
                var req = new XMLHttpRequest();

                req.onload=function(e){
                    console.log(this)
                }

                req.open('PUT','http://localhost/site_template/create_file.php',true);
                req.send(formData);
  • 写回答

0条回答 默认 最新

    报告相同问题?