HTML 參考手冊
元素對象
獲取鏈接的 target 屬性值:
輸出結果:
getAttribute() 方法通過名稱獲取屬性的值。
提示:如果你想返回屬性請使用 getAttributeNode 方法。
所有主要瀏覽器都支持 getAttribute() 方法