document.formname.inputname at 2009.8.6 7:07
这个问题我之前已经遇到过一次了,但是这次又忘记了,依然又犯错了,所以我必须要记录一下。
看一下这个例子:
<form name="hehe">
<input type="checkbox" name="haha" />
</form>
<form name="hehe2">
<input type="checkbox" name="haha" />
<input type="checkbox" name="haha" />
</form>
<script type="text/javascript">
document.write(document.hehe.haha.length);
document.write('<br />');
document.write(document.hehe2.haha.length);
</script>