Home  >  Article  >  Backend Development  >  javascript - What are the reasons why js files are imported but not displayed?

javascript - What are the reasons why js files are imported but not displayed?

WBOY
WBOYOriginal
2016-12-01 00:25:521854browse

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.

Reply content:

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

  1. Check if there is any error in the console, such as a reference error

  2. Data problem, whether the data interface reports an error, or the data returned by the interface is incorrect.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn