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

Chapter 23. Programming Links and Anchors > Working with the Link Object

Working with the Link Object

It's not a stretch to say that hypertext links are the defining characteristic of the pages that populate the World Wide Web. On the surface, most pages—with their text and images and headings arranged just so—look more or less like the media we're used to reading in the "real" world: newspapers, magazines, books, brochures, and so on. But there's just something that's different about being able to click a link and automatically be whisked off to some other page. Even better, you never know whether your journey will be a short hop to a page in the same directory or a long leap to a page on a server on the other side of the world.

With links being such a fundamental part of the Web landscape, it's only right that you should have some way of controlling them in your scripts. You can do that via the links property of the Document object. This property returns an array that consists of all the links that are defined in the document. In turn, each of those array items is a Link object that you can work with directly.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint