Last active
August 1, 2019 18:31
-
-
Save Jagathishrex/35f5dc05aef2435523f5194cdadcb463 to your computer and use it in GitHub Desktop.
Using an external Javascript file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File_Name -> index.html | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>First Javascript Program</title> | |
</head> | |
<body> | |
<button onclick="sayHi()"> Say hi </button> | |
</body> | |
<script src"script.js" > </script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sayHi() { | |
alert("hi"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment