HTML DOM Anchor Object>>

Anchor Object

The Anchor object represents an HTML hyperlink. For each instance of an HTML <a> tag in a document, an Anchor object is created.

An anchor can be used to create a link to another document (with the href attribute) or to create a bookmark inside a document (with the name attribute).

You can access an Anchor object by indexing the anchors' array (by number or name) of the Document object or by using getElementById().

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Anchor Object Properties

Property Description IE F N W3C
accessKey Sets or returns the keyboard key to access the link 5 1 6 Yes
charset Sets or returns the character set of the linked resource 6 1 6 Yes
coords Sets or retrieves a comma-separated list with coordinates, defining an active region geometry 6 1 6 Yes
href Sets or returns the URL of the linked resource 5 1 6 Yes
hreflang Sets or returns the language code of the linked resource 6 1 6 Yes
id Sets or returns the id of the link 4 1   Yes
innerHTML Sets or returns the text of the link 4 1   Yes
name Sets or returns the name of the link 4 1 4 Yes
rel Sets or returns the relationship between the current document and the target URL 5 1 6 Yes
rev Sets or returns the relationship between the current document and the target URL 5 1 6 Yes
shape Sets or returns the active area. Coordinates are given by coords 6 1 6 Yes
tabIndex Sets or returns the index that defines the tab order for the link 5 1 6 Yes
target Sets or returns where to open the target URL 5 1 6 Yes
type Sets or returns the MIME type of the linked resource 6 1 6 Yes

Anchor Object Methods

Method Description IE F N W3C
blur() Removes focus from the link 5 1 6 Yes
focus() Gives focus to the link 5 1 6 Yes

Anchor Object Events

Syntax: object.event_name="someJavaScriptCode"

Event Description IE F N W3C
onBlur Executes some code when the link loses focus 3 1 2  
onFocus Executes some code when the link gets focus 3 1 2  

 

<< Back








   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006 All Rights Reserved By CodeDcode.Com