Use console.log() skillfully when debugging, which is much more convenient than using alert().
Jquery error prone point: when splicing elements, the elements have not been added to the DOM, so use this pre-add element operation.
The data dynamically obtained by ajax has not yet been loaded with html elements. Next, we will start operating with pre-assembled elements.
Written like this, when you click "Submit", the error "Uncaught SyntaxError: Unexpected token )" will be reported. In fact, writing "javascript:void()" will also report this error, change it to "javascript:void(0)" That’s it
Finally change it to this.
I always thought that a string is an array of characters, so "abc"[0] equals "0". In fact, neither IE6 nor 7 supports this. The solution is
When the server control checkbox generates HTML, span will be added outside. Therefore, you cannot directly add styles to server controls.