html - Why do regular form submits POSTing data result in page refreshes? -


The title question asks, what process is there? Why should I use AJAX if I want to add that form asynchargly?

This is the way HTTP was created After this, JavaScript was not ubiquitous and today's form Not powerful in.

Anyway, when you post data to a page (a path), you are issuing a request for a server. The server can respond in a variety of behaviors, the simple "return is some content", whether it be HTML, text, JSON, XML etc. Even the server also has the possibility of returning a redirect, so that you can be sent to a different location.

AJAX has requested this request only to run this request in the background and to hide the fact that the data was submitted to the server and the response was returned from the user's perspective.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -