How to add javascript in html?
Javascript is not java language,but it is used to handle webpage at more
advanced level from client side,where as php is used to handle webpage from
server side.By using javascript we can totally control the webpage and its events
and many more graphics and userfriendly features.javascript can be added inside
head or body tags,makes no difference,but usually we follow to add it inside
head tags.
script tag is used to add javascript in webpage.
<script >....</script>
we can write functions inside javascript and can also handle total
webpage.
Example:
<html>
<head>
<h3>adding javascript to html page</h3>
</head>
<body>
<script>
document.write('<h5>hi i am inside javascript.....</h5>');
</script>
</body>
</html>
Output:
Thank you for reading our blog...
Javascript is not java language,but it is used to handle webpage at more
advanced level from client side,where as php is used to handle webpage from
server side.By using javascript we can totally control the webpage and its events
and many more graphics and userfriendly features.javascript can be added inside
head or body tags,makes no difference,but usually we follow to add it inside
head tags.
script tag is used to add javascript in webpage.
<script >....</script>
we can write functions inside javascript and can also handle total
webpage.
Example:
<html>
<head>
<h3>adding javascript to html page</h3>
</head>
<body>
<script>
document.write('<h5>hi i am inside javascript.....</h5>');
</script>
</body>
</html>
Output:
adding javascript to html page
hi i am inside javascript.....
Now you learnt how to add javascript in html.Thank you for reading our blog...
No comments:
Post a Comment