How to Insert a File With Javascript

How to Insert a File With Javascript thumbnail
Javascript is used to create dynamic pages.

Javascript provides Web developers with the tools necessary to create dynamic pages. Javascript is used to create menus, change images when the user hovers the mouse, and implement client-side navigation. Javascript is a client-side language, which means it's executed on the user's machine. HTML design standards place Javascript code in separate files with a ".js" extension. These files are inserted in your HTML code in the header section of the Web page.

Instructions

    • 1

      Open your HTML file in a text editor. You can edit your HTML code in a simple editor such as Notepad, which is freely available in the Windows operating system.

    • 2

      Scroll down to the "<head>" tags in your HTML code. The "<head>" and "</head>" tags are located above the HTML's body, so it is near the top of your Web page.

    • 3

      Use the following code to insert the Javascript file:

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

      Replace "FileName.js" with your own Javascript file.

    • 4

      Save your HTML file to complete the changes. After the Javascript file is inserted, you can use all the functions and code contained in the file.

Related Searches:

References

  • Photo Credit http, www, icon, web, website image by creative from Fotolia.com

Comments

You May Also Like

Related Ads

Featured