Monday, February 26, 2018

Fetching javascript from an External file

<!DOCTYPE html>
<html>
<body>

<h1>External JavaScript</h1>

<p id="demo">A Paragraph.</p>
<p id="memo">Yash Singh.</p>

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

<p>(myFunction is stored in an external file called "myScript.js")</p>
<button type="button" onclick="f1()">Do this</button>
<p>(f1() is stored in an external file called "myScript1.js")</p>


<script src="myScript.js"></script>
<script src="myScript1.js"></script>

</body>
</html>
Thanks
Happy programming!

No comments:

Post a Comment

Class IX IT notes: Part A, Unit 1, Session 3.

 IT notes class 9 Part A Unit 1: COMMUNICATION SKILLS session 3: VISUAL AND WRITTEN METHODS OF COMMUNICATION Q1. What is Visual Communicatio...