js实现checkbox批量增加和删除

.//判断checkbox是否选择  
        function checkSelect(obj,name)  
        {  
           var count = 0;  
           //var checkId = new Array;  
           var form = document.getElementsByTagName("input");  
           for(var i=0; i<form.length; i++)  
            {  
               if (form[i].type=="checkbox"&&form[i].checked&&form[i].name == name )  
                {  
                    ++count;  
                }  
            }     
     
            if(count==0){  
                alert("请选择要处理服装!");  
            }  
            else{  
                if(obj.value == "上架"){  
                    if(confirm("确定要上架这"+count+"件服装吗?")){  
                            with(document.getElementById("form11")){  
                                method="post";  
                                action="clothingStock_saleClothing.action";  
                                submit();                                             
                            }  
                    }  
                }  
                if(obj.value == "删除"){  
                    if(confirm("确定要删除这"+count+"件服装吗?")){  
                        with(document.getElementById("form11")){  
                            method="post";  
                            action="clothingStock_deleteClothing.action";  
                            submit();                                             
                       }  
                    }  
                }  
            }  
        } 

阅读更多
文章标签: action function input
下一篇SSH分页,要忘记的
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭