On the submission form synchronous and asynchronous submit

(1) Analysis

  It from the properties, the form has a default commit behavior, the default is synchronous, ie synchronous form is submitted, the browser will lock (circling ... ...), waiting for a response result of the service side. Then do the next comparative analysis

 

(2) asynchronous submit, first of all look at cases where the asynchronous submission

  

Asynchronous form submission: form internal label no longer write action and method, but by ajax url and method of submitting options to achieve

 

(3) submit sync

  

    Ajax synchronization is no longer required to submit, but adding action and method attributes directly in the start tag form in the form of realization, then began to register

  

     Click on the submit button

    

    Refresh the page again, as follows

    

 

(4) differences

    Synchronization submit the form content will cause the browser lock, asynchronous submit the form content is not locked occur, any browser can then do other things.

 

 

 

 

 

 

 

.

Guess you like

Origin www.cnblogs.com/jianxian/p/12294713.html