How to add javascript file reference in the web page?

 Posted by Raja on 3/5/2009 | Category: HTML 5 Interview questions | Views: 12417
Answer:

We can use <script> tag to refer the .js file available on the server, we can not only refer only those file that are on our server but we cal also any .js file that is available on other server (on other domain.

<script src="/include/myjscode.js" type="text/javascript"></script> 


It is always suggested to place the script tag inside <head></head>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response