checkbox数组只有一个checkbox的时候length好像错误! 怎样解决这个问题?var count=document.form1.optcheck.length; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 写个的HTML和JAVASCRIPT给我看看。HTML、JAVASCRIPT各一行就够了! <form name="form1" id="form1" action="" method="post"><input type="checkbox" name="chk[]" name="one"/></form><script type="text/javascript"> chk = document.getElementsByName('chk[]'); alert(chk.length);</script> var count=document.form1.optcheck[].length;这样为什么不行? var count=document.form1.length; // 这样不行? var count=document.form1.optcheck[].length;这样为什么不行? <script type="text/javascript">var chk=new Array('1','2'); alert(chk.length);</script>你没有把它定义为数组,, 控件不能以数组获取到 连续用 “等号”是什么意思? php保存临时文件 php里字符串转字节数组(byte[])的方法或者函数(类) 关于AJAX和PHP的交互 用PHP与XML联手进行网站编程[2] asp里的一段代码如何用php实现? 好郁闷,不想回学校考那些烂试拿文凭,父亲又会发大火 PHP编程QQ群!代码:3694215 谁能帮忙解释一下这个例子 奇怪啊,大家看看我是不是特殊情况 php分页问题 php+mysql输入自动显示对应信息!!!!!
<form name="form1" id="form1" action="" method="post">
<input type="checkbox" name="chk[]" name="one"/>
</form>
<script type="text/javascript">
chk = document.getElementsByName('chk[]');
alert(chk.length);
</script>
var chk=new Array('1','2');
alert(chk.length);
</script>
你没有把它定义为数组,, 控件不能以数组获取到