<!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!
<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