<form id="form2" name="form2" method="post" action="">
...
<input type="checkbox" id="chkSpid" name="chkSpid" value="'<%=rs4("spid")%>'"/>
...
全选<input type="checkbox" name="chkAll" id="chkAll" onclick="CheckAll(this.form)"
value="checkbox"/>
<input type="button" id="btn1" name="btn1" value="批量选购选中的产品" onclick="allBuy()"/>
...
</form>
<script type="text/JavaScript">
<!--
/*全选checkbox函数*/
function CheckAll(from)
{
for(var i=0;i<form.elements.length;i++)
{
var e=form.elements[i];
if(e.Name!="chkAll"&&e.desabled!=true)
e.checked=from.chkAll.checked;
}
}
function allBuy()
{
document.form2.action="../处理全选结果的页面";
document.form2.submit();
}
/*实现跳转页面的函数*/
function MM-jumpMenu(tart,selObj,restore)
{
eval(tart+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if(restore)
{
selObj.selectedIndex=0;
}
}
//-->
</script>
...
<input type="checkbox" id="chkSpid" name="chkSpid" value="'<%=rs4("spid")%>'"/>
...
全选<input type="checkbox" name="chkAll" id="chkAll" onclick="CheckAll(this.form)"
value="checkbox"/>
<input type="button" id="btn1" name="btn1" value="批量选购选中的产品" onclick="allBuy()"/>
...
</form>
<script type="text/JavaScript">
<!--
/*全选checkbox函数*/
function CheckAll(from)
{
for(var i=0;i<form.elements.length;i++)
{
var e=form.elements[i];
if(e.Name!="chkAll"&&e.desabled!=true)
e.checked=from.chkAll.checked;
}
}
function allBuy()
{
document.form2.action="../处理全选结果的页面";
document.form2.submit();
}
/*实现跳转页面的函数*/
function MM-jumpMenu(tart,selObj,restore)
{
eval(tart+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if(restore)
{
selObj.selectedIndex=0;
}
}
//-->
</script>