Home > Article > Web Front-end > Why does bootstrap request JavaScript fail?
I found that bootstrap’s js could not take effect normally. I sorted out the information found online and the situation I encountered.
If you want to know more about bootstrap, you can click: bootstrap framework
1. The import path is wrong,
2. The imported css files and js files are in the wrong order
## a .Import bootstrap’s .css file b.Import jquery’s .js file (bootstrap’s js depends on jq and must have jq) c.Import bootstrap’s .js fileIt is best to import the two js after other tags are loaded, that is, at the bottom of the body tag.
3. The js version of bootstrap does not match the html version of bootstrap used. If the html structure of bootstrap used is version 3.3.7, the js version of bootstrap If it is version 4.0, the js may not take effect normally. Go to the official website and download the corresponding version of js again.
(Open the bootstrap js, you can see the version number in the file description, the following is version 3.3.7)/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under the MIT license */
The above is the detailed content of Why does bootstrap request JavaScript fail?. For more information, please follow other related articles on the PHP Chinese website!