This should yield the value HTTP or FILE or one of the other available protocols according to how the image was accessed. This allows you to build script code than can behave differently according to how the image was loaded.
Typically this might allow for a different page content to be displayed when an image is loaded from a local file system.
Refer to the URL topic for details of a variety of URL protocol values.
See also: | Anchor.protocol, Document.protocol, URL, Url.protocol |
Prev | Home | Next |
IMG.name | Up | IMG.prototype |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |