Home > Web Front-end > HTML Tutorial > What should I do if the introduction of js into html does not take effect?

What should I do if the introduction of js into html does not take effect?

藏色散人
Release: 2023-01-03 09:25:27
Original
11364 people have browsed it

The solution to the problem that importing js into html does not work: 1. Use script to import js external files, do not use links to import them; 2. When there is code in javascript that directly operates page elements, put js in the body Just quote it internally.

What should I do if the introduction of js into html does not take effect?

The operating environment of this article: Windows7 system, HTML5, Dell G3 computer

html does not take effect when introducing external js files?

First: Introduce external files to ensure normal introduction, that is, use script to introduce, do not use link to introduce

Second: In javascript, there are direct operations on page elements code, so it cannot be quoted in the head, but should be quoted in the body

Now the effect you want should come out.

【Recommended: HTML video tutorial

The above is the detailed content of What should I do if the introduction of js into html does not take effect?. 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