HTMLAnchorElement

 

HTMLAnchorElement接口表示超链接元素。

HTMLAnchorElement()

继承层次

Object.prototype
 Function.prototype
  EventTarget
   Node
    Element
     HTMLElement
      HTMLAnchorElement

构造函数

程序不能直接调用该构造函数,否则将会产生异常。

相应地应该使用document.createElement(“a”)方法。

属性列表

属性说明
--

方法列表

语法说明
--

HTMLAnchorElement.prototype

继承层次

Object.prototype
 EventTarget.prototype
  Node.prototype
   Element.prototype
    HTMLElement.prototype
     HTMLAnchorElement.prototype

属性列表

从其父级继承的属性请查阅: HTMLElement

属性说明
accessKey单个字符访问键,用于访问表单控件。
hreflang链接资源的语言代码。
media是一个 DOMString 表达 media HTML属性,标识媒体链接的资源。
rel是 DOMString,表示 HTML 的 rel 属性,指定目标对象指向链接对象的关系。
relList只读,返回一个DOMTokenList表示相关的HTML属性,作为一个标记列表。
tabindex表示元素在制表顺序中的位置的索引。
target是 DOMString 表示目标的HTML属性,显示链接的资源。
textIs a DOMString being a synonym for the Node.textContent property。
type是DOMString代表HTML属性的类型,指示链接资源的MIME类型。

方法列表

从其父级继承的方法请查阅: HTMLElement

方法说明
blur()从当前元素移除键盘焦点。
focus()当前元素获取键盘焦点。

HTMLAnchorElement实例

Object.prototype
 EventTarget.prototype
  Node.prototype
   Element.prototype
    HTMLElement.prototype
     HTMLAnchorElement.prototype
      <a> 元素

参考

相关页面

外部链接