三步搞定全选删除//action中调用<br>
$user=M('User');<br>
$base=A('Base');<br>
$user->deleteall($staff);
//全选删除函数<br>
public function deleteall($mouldel){<br>
@extract($_POST);<br>
$counts=count($id);<br>
for($i=0;$i
{<br>
$mouldel->where('id="'.$id[$i].'"')->delete(); <br>
}<br>
if($counts)<br>
{<br>
$this->success("删除成功");<br>
}<br>
else<br>
{<br>
$this->error("删除失败");<br>
} <br>
}
模板中js部分
function unselectall(){
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form){
for (var i=0;i
AD:真正免费,域名+虚机+企业邮箱=0元