I’m trying to create a form using method="post".
When it’s submitted, the data in the form will be posted via HTTP packet – so they won’t make the URL bar look messy.
The problem is I don’t know how to retrieve the data using simple javascript running at client side.
Or alternatively, is it possible to recover the URL address bar after the user clicks submit? (As the URL would look like: form.html?area1=x&area2=y&... which makes the address bar full of characters. What I hope is to make it look identical to what it was before the user submits the form.)
No, it’s not possible to do that in client-side JavaScript; that’s what a server is for. If you only need to pass variables between the same application, consider using URLs that differ in hash only to enable links; then, you don’t even have to change pages, and you can keep the same data.