![]() |
Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk |
|
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Registered User
Join Date: Jun 2015
Posts: 246
|
![]()
Whenever you are going to use a script in more than one page it’s a good idea to place it in an external JavaScript file (a technique you learned about at the beginning of Chapter 11). For example, in the “Image Rollovers” section later in the chapter you will see an example of a script that creates image rollovers for
a navigation bar. Your navigation will appear on each page, so rather than including the image rollover function in each page, you can just include the one script into every page. This has the following three advantages ❑ If you need to change something about the navigation, you need to change only the one function, not every page. ❑ The file size of the pages is smaller because the JavaScript is in one file that is included on each page rather than repeated. ❑ You do not have to copy and paste the same code into several files. Asthi jivak | Fat Cutter | Hot Shaper | Asthijivak |
![]() |
![]() |
![]() |
#2 |
Registered User
Join Date: Dec 2014
Posts: 299
|
![]()
External JavaScript file provides code re usability because single JavaScript file can be used in more no. of HTML pages. It can be saved by using .js extension. It is recommended to embed all JavaScript files into a single file. It helps to increase the speed of the web page.
web design Company | web designing company in hyderabad |
![]() |
![]() |
![]() |
Bookmarks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
JavaScript - Displaying All files of a directory | patton | Web Development - Programming / Coding | 2 | 03-29-2007 03:45 PM |
Javascript help needed | coolshop | Web Development - Programming / Coding | 4 | 11-21-2001 02:01 PM |
.txt files and Search Engines | hobbnet | Web Design and Webmaster Issues | 0 | 01-28-2001 11:50 PM |
Javascript within Javascript ???? | 1lit | Web Design and Webmaster Issues | 0 | 11-26-2000 04:19 PM |
Remote hosting of high-bandwidth files | Arn | Web Design and Webmaster Issues | 1 | 03-22-2000 12:41 AM |