-
1.
between head tags
2. between body tags
When we write the Javascript between the <body></body> tags then the script will be executed in the server side.
i.e. the script written in between the body tags will be executed before the page loads at the client machine (In the server itself). And the script written in between the head tag will be executed after the page loads at the client side.
Example:
Between head tags:
-----------------------------
<head>
<script language='javascript'>
alert('between head')
</script>
</head>
Between body tags:
-----------------------------
<body>
<script language='javascript'>
alert('between body')
</script>
</body>
No comments:
Post a Comment