Home > Article > Web Front-end > Detailed explanation of pre-binding and post-binding in js_Basic knowledge
The main meaning is to see if I have used pre-binding, that is, before certain elements in the Dom tree are created, certain events that the elements of that type should have as soon as they are born are specified. In the actual development process, front binding and post binding are often involved. As the name suggests, pre-binding - certain events are bound before birth, and post-binding - certain events are bound after birth.
The following is explained through a simple example for your reference and comparison of various methods:
Page elements: