'href' Syntax and Note : href « Javascript Properties « JavaScript Reference

Home
JavaScript Reference
1.Event Handlers Reference
2.Javascript Collections
3.Javascript Methods
4.Javascript Objects
5.Javascript Properties
JavaScript Reference » Javascript Properties » href 
'href' Syntax and Note

Note:

Read and write property. 
For the <a>,                     this property specifies the anchor point of the URL. 
<area>, and 
<link> elements,
-------------------------------------------------------------------------------------- 
For the <base> element,          it establishes a default URL for
                                 relative links. 
-------------------------------------------------------------------------------------- 
For the location object,         it specifies the entire URL. 
-------------------------------------------------------------------------------------- 
For the styleSheet object,       it specifies the URL of the linked style sheet.
    
Syntax:
    
document.getElementById("elementID").href = value
document.all.elementID.href = value // IE only

    

      
      
Related examples in the same category
1.'href' Example
2.'href' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.