In which section(s) we can write Javascript functions in an HTML file?

 Posted by vishalneeraj-24503 on 3/13/2014 | Category: ASP.NET Interview questions | Views: 482 | Points: 40
Answer:

We can write Javascript functions both in <Head> section as well as in <Body> section .

For Example:
<head>

<script type="text/javascript">
function alert_message()
{
alert("hello");
}
</script>
</head>

<body>
<script type="text/javascript">
function alert_message()
{
alert("hello");
}
</script>
</body>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response