Answers for "adding js file in htm;"

2

include js in html

<html>
    <head>        
    </head>
    <body>
    
        <script type="text/javascript" src=es4.js></script>
           
    </body>
        
</html>
Posted by: Guest on January-26-2021
1

how to write code in external javascript file

function myFunction() {

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

}
Posted by: Guest on May-25-2021

Browse Popular Code Answers by Language