Answers for "javascript external file example"

2

how to write code in external javascript file

function myFunction() {

  document.getElementById("demo").innerHTML = "Paragraph changed.";

}
Posted by: Guest on May-25-2021
0

pointing to an external javascript file in html

<script src="my_javascript_file.js"></script> 
      <!-- Both work -->
<script src="../src/js/[file_name].js"></script>
Posted by: Guest on September-01-2021

Code answers related to "javascript external file example"

Browse Popular Code Answers by Language