Chapter 17. Bookmarklets


You know that JavaScript can be used to control Web browsers from inside your Web pages. However, you can also use JavaScript to control your browser without using Web pages, by using what are called bookmarklets . Bookmarklets are bookmarks (or favorites, if you prefer Internet Explorer's terminology; sometimes bookmarklets are called favelets) that contain a call to the browser's JavaScript interpreter, instead of an external URL. The JavaScript in your bookmarklets can do anything from getting details about images, to giving you the definition of a word, to displaying a graphical chart of all the Web-safe colors. And because you know JavaScript, this functionality is easy to add to make your browser a smarter , better tool.

Bookmarklets differ from other JavaScript code that you'll write because they have a significant and interesting formatting limitation: they must be written all in one line. You'll use semicolons to string commands together.

In this chapter, you'll be introduced to a variety of useful bookmarklets, and with a bit of effort, you'll be able to go forth and write your own.




JavaScript and Ajax for the Web(c) Visual QuickStart Guide
JavaScript and Ajax for the Web, Sixth Edition
ISBN: 0321430328
EAN: 2147483647
Year: 2006
Pages: 203

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net