How to read the post request parameters using JavaScript

后端 未结 18 1405
自闭症患者
自闭症患者 2020-11-22 16:41

I am trying to read the post request parameters from my HTML. I can read the get request parameters using the following code in JavaScript.

$wnd.location.sea         


        
18条回答
  •  我在风中等你
    2020-11-22 17:12

    A little piece of PHP to get the server to populate a JavaScript variable is quick and easy:

    var my_javascript_variable = ;
    

    Then just access the JavaScript variable in the normal way.

    Note there is no guarantee any given data or kind of data will be posted unless you check - all input fields are suggestions, not guarantees.

提交回复
热议问题