-------------------------- Title
Recently, I encountered a very strange problem in development. When a button is clicked to submit, multiple errors occur. requests, resulting in data duplication.
Then, after debugging, it was found that the cause of the problem is $("#id").live("click", function() {}); in this live, if you use bind, it may not be achieved Requirement, because if the returned request after an asynchronous request is html instead of json, the bind component may fail when the page is refreshed using html.
-------------------------- Solution
So, in the end, it can only be on the html tag element Add onclick attribute to solve it.
This not only solves the problem of asynchronous return of html format, but also solves the problem of multiple requests on one click caused by multiple bindings caused by multiple html() refreshes of the page (including the js part). bug.