How do I pass along variables with XMLHTTPRequest

后端 未结 7 807
孤街浪徒
孤街浪徒 2020-11-30 03:47

How do I send variables to the server with XMLHTTPRequest? Would I just add them to the end of the URL of the GET request, like ?variable1=?v

7条回答
  •  清歌不尽
    2020-11-30 04:13

    Yes that's the correct method to do it with a GET request.

    However, please remember that multiple query string parameters should be separated with &

    eg. ?variable1=value1&variable2=value2

提交回复
热议问题