1. Technology

Using Pre-written JavaScript Scripts


1 of 6

Web Editor

The first thing you need in order to be able to use JavaScript written by someone else on your own web pages (apart from permission to use the script of course) is a web editor. Not just any web editor will do though.

If you are using one of those "What You See is What You Almost Get" or WYSIWYAG editors then it is only going to be useful for this if it has an option to view and edit the actual HTML source.Even then you will need to figure out how to switch to that mode and how to use the editor to be able to create files that are pure JavaScript or CSS.

The simpler option is to use a web editor that just works with the plain text source code of the web page directly. While you may not want to use such an editor for creating your own web pasges, a plain text web editor is the easiest to use for adding JavaScripts that someone else has written into your web page. You will not even need to download such an editor as all computers come with one already installed. On Windows this editor is called Notepad.

If you want an editor that will be slightly easier to work with because it can colour code the file content and make specific code easier to find then you might tale a look at Notepad++ which is available as a free download.

  1. About.com
  2. Technology
  3. JavaScript
  4. Script Library
  5. Using Pre-written JavaScript Scripts - Web Editor

©2014 About.com. All rights reserved.