How to read the post request parameters using JavaScript

后端 未结 18 1155
自闭症患者
自闭症患者 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:28

    I have a simple code to make it:

    In your index.php :

    
    

    In your main.js :

    let my_first_post_param = $("#first_post_data").val();
    

    So when you will include main.js in index.php () you could get the value of your hidden input which contains your post data.

提交回复
热议问题