How to use External JavaScript from another folder

Javascript / Overview of Javascript

225

Program:

<!DOCTYPE html>
<html>
<body>

<h2>External JavaScript</h2>

<p id="demo">A Paragraph.</p>

<button type="button" onclick="myFunction()">Try it</button>

<p>(myFunction is stored in an external file called "ExternalJavascript.js")</p>

<script src="/js/ExternalJavascript.js"></script>

</body>
</html>

Output:

Nope

Explanation:

Nope

This Particular section is dedicated to Programs only. If you want learn more about Javascript. Then you can visit below links to get more depth on this subject.