Wiki source code of How to do POST in HTML pages

Last modified by Leon Poon on 2021/03/23 13:15

Show last authors
1 Use your fav text editor and start a HTML file.
2
3 {{{<!DOCTYPE html>
4 <html>
5 <body>
6
7 <form method="POST" action="http://127.0.0.1:5000/">
8 <input type="text" name="my_key" />
9 <input type="submit" />
10 </form>
11
12 </body>
13 </html>
14 }}}
15
16 If you open this HTML file in a web browser, fill up the textbox and click "Submit", then your browser will POST your data to [[http:~~/~~/127.0.0.1:5000/>>url:http://127.0.0.1:5000/]].