Sunday, 15 July 2012
How to create An external JavaScript
<!DOCTYPE html>
<html>
<body>
<h1>Web Page</h1>
<p id="demo">A Paragraph.</p>
<button type="button" onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> The actual script is in an external script file called "myScript.js".</p>
<script type="text/javascript" src="myScript.js"></script>
</body>
</html>
Result:
Web Page
My First External JavaScript
This post was written by: Bharathi
Bharthi is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “How to create An external JavaScript”
Post a Comment