Home > Web Front-end > Front-end Q&A > Where to put javascript

Where to put javascript

PHPz
Release: 2023-04-06 10:43:42
Original
1120 people have browsed it

Where is JavaScript placed?

JavaScript is a programming language used for web front-end development, which can make web pages more dynamic and interactive. So, where do we put JavaScript?

  1. Internal script

In HTML documents, we can embed JavaScript code snippets in the or tags. This is the most common way for developers to write JavaScript code directly in HTML files. However, this will cause the HTML document to become bloated, which is not conducive to code management and maintenance.

  1. External script

External script is a method of placing JavaScript code in a separate JS file, using the

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template