This example displays how to use javascript to write something in the HTML Document
<html>
<body>
<script type = "text/javascript">
document.write ("Hello!.. This is my 1st Javascript program");
</script>
</body>
</html>
Following example displays how to use HTML elements within the javascript
<html>
<body>
<script type = "text/javascript">
document.write ("<h2>Hello!.. This is my 1st Javascript program</h2>");
</script>
</body>
</html>
No comments:
Post a Comment