Prevent multiple clicks the submit button caused by multiple submissions of data

Ideas:

After the submit button, before ajax submit, submit button settings can not be submitted again, and then the Settings button in the callback success can be submitted

// set the submit button does not submit   
$ ( ' #addorder ' ) .attr ( " Disabled " , " Disabled " );

// callback after completion of the submit button to submit again
$ ( ' #addorder ' ). RemoveAttr ( " Disabled " ) ;

 

Guess you like

Origin www.cnblogs.com/zhangyouwu/p/11589133.html