J
Jenny
Hi,
Can I create an array of tags by assigning same name to these tags?
For example, I have two <p> tags with the same name t1. But
document.all.b.value=document.all.t.length
does not work. It works if the tags are <input type=radio...>. This
line is OK:
document.all.btn.value=document.all.b.length
What are the tags that can be use as an array of tags by assigning
same name to these tags?
<HTML><script language="JavaScript">
function checkButtonSets(){
//document.all.btn.value=document.all.t.length
document.all.btn.value=document.all.b.length
}</script><HEAD>
<BODY>
<p name="t" id=q></p>
<p name="t" id=q></p>
<input type="Radio" name="b" value="a2">a2
<input type="Radio" name="b" value="a3">a3<br>
<input name="btn" type="Button" value="Check Button Sets"
onClick="checkButtonSets()">
</BODY></HTML>
Can I create an array of tags by assigning same name to these tags?
For example, I have two <p> tags with the same name t1. But
document.all.b.value=document.all.t.length
does not work. It works if the tags are <input type=radio...>. This
line is OK:
document.all.btn.value=document.all.b.length
What are the tags that can be use as an array of tags by assigning
same name to these tags?
<HTML><script language="JavaScript">
function checkButtonSets(){
//document.all.btn.value=document.all.t.length
document.all.btn.value=document.all.b.length
}</script><HEAD>
<BODY>
<p name="t" id=q></p>
<p name="t" id=q></p>
<input type="Radio" name="b" value="a2">a2
<input type="Radio" name="b" value="a3">a3<br>
<input name="btn" type="Button" value="Check Button Sets"
onClick="checkButtonSets()">
</BODY></HTML>