Running JavaScript code
Need a third file:
script.js
Similar to CSS: include link within HTML head
-
- < script > tag to include code
-
- src=" ... " the path to the JavaScript file
-
- defer: execute the script when the HTML page is parsed
-
-
Avoid other inline JS inclusion
10/41