Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 Google Inc.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
   * use this file except in compliance with the License. You may obtain a copy of
   * the License at
   * 
   * http://www.apache.org/licenses/LICENSE-2.0
   * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  * License for the specific language governing permissions and limitations under
  * the License.
  */
 package elemental.html;
 
 import  elemental.html.*;
 
 import java.util.Date;

DOM anchor elements expose the HTMLAnchorElement (or HTML 4 HTMLAnchorElement) interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of hyperlink elements.
 
 public interface AnchorElement extends Element {


  
The character encoding of the linked resource. Obsolete in HTML5
 
 
   void setCharset(String arg);


  
Comma-separated list of coordinates. Obsolete in HTML5
 
 
   void setCoords(String arg);
 
 
   void setDownload(String arg);


  
The fragment identifier (including the leading hash mark (#)), if any, in the referenced URL.
 
   String getHash();
 
   void setHash(String arg);


  
The hostname and port (if it's not the default port) in the referenced URL.
 
   String getHost();
 
   void setHost(String arg);


  
The hostname in the referenced URL.
 
 
   void setHostname(String arg);


  
Reflects the href HTML attribute, containing a valid URL of a linked resource.
 
   String getHref();
 
   void setHref(String arg);


  
Reflects the hreflang HTML attribute, indicating the language of the linked resource.
  void setHreflang(String arg);


  
Anchor name. Obsolete in HTML5
  void setName(String arg);
  String getOrigin();


  
The path name component, if any, of the referenced URL.
  void setPathname(String arg);
  void setPing(String arg);


  
The port component, if any, of the referenced URL.
  void setPort(String arg);


  
The protocol component (including trailing colon (:)), of the referenced URL.
  void setProtocol(String arg);


  
Reflects the rel HTML attribute, specifying the relationship of the target object to the link object.
  void setRel(String arg);


  
Reverse link type. Obsolete in HTML5
  void setRev(String arg);


  
The search element (including leading question mark (?)), if any, of the referenced URL
  void setSearch(String arg);


  
The shape of the active area. Obsolete in HTML5
  void setShape(String arg);


  
Reflectst the target HTML attribute, indicating where to display the linked resource.
  void setTarget(String arg);


  
Same as the textContent property.
  String getText();


  
Reflects the type HTML attribute, indicating the MIME type of the linked resource.
  void setType(String arg);
New to GrepCode? Check out our FAQ X