Send post-variable with javascript?

前端 未结 5 994
逝去的感伤
逝去的感伤 2021-01-05 19:55

Is it possible to send post-variables with javascript? I want id to be sent with post, not get.

window.location.href=\"hanteraTaBortAnvandare.ph         


        
5条回答
  •  孤街浪徒
    2021-01-05 20:22

    The simplest way is to just have a form in your page:

    Then you just post the form:

    document.getElementById("DeleteUserForm").submit();
    

提交回复
热议问题