M
Man-wai Chang
Why 2 reference points?
Why 2 reference points?
What's the difference between name and id?
Why 2 reference points?
Do you have a Gecko-only version to look at?Website:http://www.itech.com.hk(IE only)
within a page. Lots of elements can share the same "name" however.
This is why the DOM gives you "getElementById(SomeId)" to return a
single element, and "getElementsByName(SomeName)" to return a
collection of elements.
id attribute was introduced only in DOM 1.
For anchors and links collections name attribute usage is deprecated
and rarely used.
Both from above are from the same DOM 0 model.
Why 2 reference points?
Expert of ePOS solutions
Man-wai Chang said:Why 2 reference points?
Man-wai Chang said:Why 2 reference points?
Wrong. The name attribute is not deprecated for A elements (which can
be either anchors or links) in HTML 4. An anchor is *defined* as an A
element with a name - if the name attribute for A elements is
deprecated, then so are anchors.
The ID attribute is intended to uniquely identify an element - ANY
element, whether part of a form, or a paragraph, span, list item, div,
anything at all - in a form.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.