Home > Article > Backend Development > javascript - What are the reasons why js files are imported but not displayed?
The JS file for city selection has been introduced. It can be displayed when opened in the morning, but not in the afternoon. The code has not been changed.
Introduced the JS file for city selection. It can be displayed when opened in the morning, but not in the afternoon. The code has not been changed.
Look at the console. Are there any abnormalities? See if js has been imported
See if there is any change in the returned data
When introducing external files, the most important thing to pay attention to is the path. Since it cannot be displayed, there must be something wrong with the path, and then you said that you have not modified it. I looked at your tags, and there is Php. I think the path provided by the original poster should be provided by the background (output template control of the PHP framework). So, ask what the phper next to you did
I encountered a situation before where the events in the html obtained by ajax could not be executed. The solution was to use the $("body").on() method
Check if there is any error in the console, such as a reference error
Data problem, whether the data interface reports an error, or the data returned by the interface is incorrect.