Due to problems caused by network speed

xiaoxiao2021-03-06  39

We often encounter this situation, there is no problem on a computer on a computer, and will report the error in another computer. This is because we are generally because we trigger an event. This JS code has not been loaded, causing this property that cannot be found. This situation we generally handle the JS code in front, if the control (such as button) is loaded before loading, this JS code has been loaded, but sometimes JS code due to some The reason has to be written below, there is no way to ensure that when we trigger an event, this JS code is fully loaded. The best way is to write these events in a function, and then call this function while triggering OnLoad. ,as follows: