<script type="text/javascript">
function checkInfo()
{
var delBox=myForm.delBox;
for(var i=0;i<delBox.size;i++)
{
if(delBox[i].checked)
{
return true;
}
}
alert("请选择需要删除的会员!");
return false;
}
</script>这个函数是表单验证的 如果全不选中就失败提示选择删除的会员,有选中的就提交表单
delBox[i]没有checked属性啊...
function checkInfo()
{
var delBox=myForm.delBox;
for(var i=0;i<delBox.size;i++)
{
if(delBox[i].checked)
{
return true;
}
}
alert("请选择需要删除的会员!");
return false;
}
</script>这个函数是表单验证的 如果全不选中就失败提示选择删除的会员,有选中的就提交表单
delBox[i]没有checked属性啊...
解决方案 »
- [讨论]prototype的成员叠加。。。。。
- 函数变量与字符串相加的问题
- 在调用window.print()进行web打印时,怎样才能屏蔽页码,以及页面最下角的时间,文件名信息,谢谢
- 如何把location.href的值赋给url参数?
- 99赠送有缘人~jQuery里面的jQuery.fn.init()方法中,this为什么指向的是jquery.fn.jquery.init[0]?
- JS循环触发gridview中删除按钮,为何只删除了最后一次循环那条数据
- Jquery解析xml文档
- print()为打印,请问下载是什么函数?
- javascript可以互相嵌套吗??
- 如何使页面进来就显示成按F11的效果?
- 求一JAVAscript效果,层的显示与隐藏!!!!!!!!!!!!!!
- 5月16号北京:ofbiz沙龙 世纪科贸大厦举行
function checkInfo()
{
var delBox = document.getElementsByName("delBox");
for(var i=0; i<delBox.length; i++)
{
if(delBox[i].checked)
{
return true;
}
}
alert("请选择需要删除的会员!");
return false;
}
<script type="text/javascript">
function checkInfo() {
var delBox=myForm.delBox;
for(var i=0;i <delBox.length;i++)
if(delBox[i].checked) {alert("请选择需要删除的会员!");return false; }
return true;
}
</script>
function checkInfo() {
var delBox=myForm.delBox;
for(var i=0;i <delBox.length;i++)
if(!delBox[i].checked) {alert("请选择需要删除的会员!");return false; }
return true;
}
</script>
<form name=myForm>
<input type=checkbox name=delBox>
<input type=checkbox name=delBox>
<input type=checkbox name=delBox>
<input type=button onclick=checkInfo() value=ok>
</form><script type="text/javascript">
function checkInfo() {
var delBox=myForm.delBox;
for(var i=0;i <delBox.length;i++)
if(delBox[i].checked) return true
alert("请选择需要删除的会员!")
return false
}
</script>
</body>
<body>
<form name=myForm onsubmit=checkInfo()>
<input type=checkbox name=delBox>
<input type=checkbox name=delBox>
<input type=checkbox name=delBox>
<input type=submit value=ok>
</form><script type="text/javascript">
function checkInfo() {
var delBox=myForm.delBox;
for(var i=0;i <delBox.length;i++)
if(delBox[i].checked) return true
alert("请选择需要删除的会员!")
return false
}
</script>
<input type = 'checkbox' id = 'delBox' name = 'delBox' />
<input type = 'checkbox' id = 'delBox' name = 'delBox' />
<input type = 'checkbox' id = 'delBox' name = 'delBox' />
<input type = 'checkbox' id = 'delBox' name = 'delBox' />
<input type = 'checkbox' id = 'delBox' name = 'delBox' />
</form><script type="text/javascript">
function checkInfo()
{
//var delBox=myForm.delBox;
var delBox = document.getElementsByName('delBox');
alert(delBox.length);
for(var i=0;i <delBox.length;i++)
{
if(delBox[i].checked)
{
return true;
}
}
alert("请选择需要删除的会员!");
return false;
}
</script>