Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Scripts > Calling an External Script

16.4. Calling an External Script

If you have some scripts that you want to use in multiple documents, consider placing them in an external file. You can then use the script tag's src attribute to specify that the script content can be found in that file. For example, suppose you want to include the following script in multiple documents:

function NewWindow(url){
   var fin=window.open(url,"","width=800,height=600,
   scrollbars=yes,resizable=yes");
 }


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint