Navigate to a new URL in Javascript with post parameters

This question already has an answer here:

  • JavaScript post request like a form submit 26 answers

  • No, there isn't. The closest thing you could do is to dynamically create and submit a form, setting its method to POST.

    You can always perform a POST request, and then redirect the browser to a new URL via a GET when the post request completes, if you need the request to be a POST request.

    Your better bet is to use the appropriate HTTP verb, and not use POST requests as a means of "hiding" parameters. POST requests should be used when you're modifying server state, not when you want prettier URLs.

    链接地址: http://www.djcxy.com/p/21924.html

    上一篇: XML属性到网页请求

    下一篇: 使用发布参数导航到Javascript中的新网址