On most of my JavaScript sample pages, I show the exact code required to perform the script. If you like, you can just copy-and-paste that code right to your own PC. I strongly suggest that you first paste the code into a simple text editor, like Windows' Notepad, to remove any formatting put in by my HTML editors.
Here's an example of how you might go about copying and pasting a chunk of code from one of my pages to your PC using Windows 95 or 98.
Figure 1: Chunk of code on one of my JavaScript sample pages is selected.
The code lands in Notepad as in the figure below (Figure 2). Again, I realize the picture is blurry. But I don't have an elegant way to reduce screenshot images without that blurriness.
Now, before you copy any code into one of your web pages, copy it out of Notepad. That is, choose Edit -> Select All from Notepad's menu bar, then press Ctrl+C. That'll get rid of any weird formatting codes from my HTML editors. Now you can paste the clipboard contents into any web page's document source.
Optionally, you can just save the code in Notepad to a text file by choosing File -> Save from Notepad's menu bar.
Figure 2: Code that was copied to the Clipboard is now in Notepad.
|