Could someone please explain what difference JavaScript sees between ID and NAME tags.
example: <div id="thediv" name="bob">
Thanks.
IDs & NAMEs
Moderator: General Moderators
to get this not too technical consider why there is a function getElementsByName() but getElementById() 
More info e.g. at
http://www.w3.org/TR/2000/REC-DOM-Level ... ID-A6C9094
http://www.mozilla.org/docs/dom/domref/ ... ref49.html
http://msdn.microsoft.com/workshop/auth ... byname.asp
---
http://www.w3.org/TR/2000/REC-DOM-Level ... D-getElBId
http://www.mozilla.org/docs/dom/domref/ ... ml#1025944
http://msdn.microsoft.com/workshop/auth ... ntbyid.asp
More info e.g. at
http://www.w3.org/TR/2000/REC-DOM-Level ... ID-A6C9094
http://www.mozilla.org/docs/dom/domref/ ... ref49.html
http://msdn.microsoft.com/workshop/auth ... byname.asp
---
http://www.w3.org/TR/2000/REC-DOM-Level ... D-getElBId
http://www.mozilla.org/docs/dom/domref/ ... ml#1025944
http://msdn.microsoft.com/workshop/auth ... ntbyid.asp
-
pistolfire99
- Forum Commoner
- Posts: 58
- Joined: Thu May 23, 2002 3:18 pm
Code: Select all
<html><body>
<pre><?php print_r($_POST); ?></pre>
<form method="POST">
<input type="input" name="withName" />:name only<br />
<input type="input" id="onlyId" />:id only<br />
<input type="input" name="theName" id="theId"/>: name & id<br />
<input type="submit" />
</form>
</body></html>