How to get data from a form in another page (JavaScript)

后端 未结 2 546
盖世英雄少女心
盖世英雄少女心 2021-01-16 18:57

My English is not good enough so I hope you understand what\'s my problem...

I have a page \'A\' with a form. When I click Submit, I want it to open/redirect to a pa

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-16 19:27

    • Never you can get POST data from client side (using javascript or any other client side language)
    • You must use a server side language to get post data (like PHP, nodeJs).
    • But you can simply get GET data from client side (javascript).

    Following is the exact solution that you want.

    Page 'A' (a.html)

       
            
            
            
                

    Page 'B' (b.html)

    
    

提交回复
热议问题