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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

B. A Very Short Introduction to JavaScript > Interacting with the Page

Interacting with the Page

So far, you’ve seen the right way to put JavaScript in a page, but you haven’t done anything impressive (in fact, you haven’t done anything but pop up a message box). Before going ahead, you need to know a bit more about the role JavaScript typically plays.

First, it’s important to understand that JavaScript code is sandboxed, which means its capabilities are carefully limited. Your page can’t perform any potentially risky tasks on your visitor’s computer, like sending orders to a printer, accessing files, running other programs, reformatting a hard drive, and so on. This design ensures good security, even for careless visitors.

Instead, JavaScript spends most of its time doing one of these tasks:


  

You are currently reading a PREVIEW of this book.

                                                                                        

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

  

Start a Free Trial