If with a The name attribute is set in the corresponding HTML tag of the form object, image object, and applet object. Its value will be used as the attribute name of the document object to refer to the corresponding object, but other objects cannot.
In addition, if input is used as a sub-element of form, it is wrong to directly use inputName or document.inputName to reference this object. You must use formName.inputName to reference, otherwise you can use inputName to reference.
In addition, you should I noticed that many commonly used elements do not have names.
If you want to reference an element with an id, you can only use Id or document.getElementById, document.all.id to reference it.
But for elements like this, so Like
... can be used
linkid.href ;
linkname.href;
document.all.linkid.href;
document.all.linkname.href;
document.getElementById("linkid").href;
document.getElementsByName ("linkname")[0].href to quote
all is a collection that contains a collection of all html objects. Write a program that can access all objects. Like this:
Be careful to put the program after