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

Query for finding high dividend paying stocks

 Post the following query in Screen.in, to get list of high dividend yield stocks: Dividend yield > 6 AND Dividend last year > 1000 AN...