After handling the keypress keyboard event yesterday, we need to add the deletion function to the field entries dynamically added to the page today, that is, add a pretty small button behind each field, when you click this button, the corresponding entries are deleted from the database.
To implement this function, you must ensure that any newly added entries can also delete events without refreshing new pages. Therefore, you must use jquery. live () is used to bind the click event to the pretty small button, but because the button is embedded on every entry, they are in a deep level of the DOM tree, I used jquery's children () to select these buttons layer by layer, but I failed to pass the test many times. The error shown on firebug is that the selector cannot be recognized by the jquery kernel, I don't know what's going on at the moment.
When I got back from work in the evening, I went back to my cell phone for a hundred times. Later I learned that jquery's live () only supports CSS selectors. To be honest, I didn't quite understand this sentence at the time, before going to work this morning, I wrote an English article on jquery's blog about the deep mechanisms of live () and die (). Later I understood that I was using live () only selector can be used. jquery's built-in traversal functions, such as children (), parent (), next (), and prev (), are not supported by live, this is also one of the shortcomings of live (). The owner of this blog said that he will study the jquery kernel and fix this defect, but it takes time and there is no way to use it first, currently, this service can meet your needs.
Later, all the traversal functions in the Code were replaced with the css selector, and everything was normal.