.on() This is a jQuery event binding method used to bind one or more event handlers to a specified DOM element.
The grammatical structure is as follows:
$(selector).on(event, childSelector, data, handler);Here, `event` represents one or more event types, e.g.,"click"、"mouseover"class;childSelector Optional: specifies the child element to match; can be any valid selector; `data` (optional): specifies additional data to be passed to the event handler function;handler It is a callback function that is executed when an event is triggered.
By invoking .on() This method allows you to dynamically add event handlers, making your code more flexible and enabling you to modify how events are handled as needed.