Your browser does not support JavaScript!
Upvotes Anonymous 0 User 1

How to Include a JavaScript File

To include a JavaScript file on a webpage, insert a <script> tag:
<!DOCTYPE html>
  <title>My Page</title>
  <script src="test.js"></script>
  Hi, here is some text.
where test.js file is a text file with some JavaScript in it, e.g.:
alert('hi there');
Was this helpful?


Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License