Skip to main content

Command Palette

Search for a command to run...

Get and Post Forms

Published
1 min read

Get Method

  • After submitting the form, the GET method displays form values in the address bar of the new browser tab.

  • It is only allowed to be roughly 3000 characters long. Only non-secure data, not sensitive data, can be used with it

Syntax:
<form method="get">

Example

Post Method

  • Unlike the GET method, the post method prevents form values from appearing in the address bar of the new browser tab after the form has been submitted.

  • It adds form information to the body.

Syntax:

<form method="post">

Example

More from this blog

Himangshu's Notes

34 posts

Full Stack Developer | MongoDB, Express, React, Node.js