Home > Web Front-end > Bootstrap Tutorial > Why does bootstrap request JavaScript fail?

Why does bootstrap request JavaScript fail?

angryTom
Release: 2020-05-15 09:20:28
Original
3552 people have browsed it

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 file

It 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
 */
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template