Home > Article > Web Front-end > JavaScript introductory tutorial (10) Understanding other objects_Basic knowledge
anchors[]; links[]; Link 连接对象
用法:document.anchors[[x]]; document.links[[x]];
document.anchors 是一个数组,包含了文档中所有锚标记(包含 name 属性的标记),按照在文档中的次序,从 0 开始给每个锚标记定义了一个下标。
document.links 也是一个数组,包含了文档中所有连接标记(包含 href 属性的标记和
Attributesapplets[] Java applet object It is an array that contains all Applet objects (Java applets) in the document ). As an array, there are array properties and methods. Regarding the properties and methods of a single Applet object, I quote: "The Applet object inherits all public properties and methods of the Java applet." (English original sentence: The Applet object inherits all public properties of the Java applet./The Applet object inherits all public methods of the Java applet.) Because I hate Java applets, I am not interested in its "public" and "private" issues, so I have not discussed them.
protocol; hostname; port; host; pathname; hash; search; href Same as location object.
target Returns/specifies the target window (string) of the connection, which is the same as the target attribute in the tag.
Event
onclick; onmouseover; onmouseout; onmousedown; onmouseup