<th>全选<input id="ckAll" type="checkbox" onclick="QuanXuan()"/></th>
<td><input class="ckc" type="checkbox" value="@item.PId"/></td>
<script>
//全选
function QuanXuan()
{
$(".ckc").prop("checked",$("#ckAll").prop("checked"))
}
//批量删除
function PLDelete()
{
var arry = new Array();
$(".ckc:checked").each(function () {
arry.push(this.value);
})
if (confirm("确定要删除吗?"))
{
$.ajax({
url: "/ErShi/PLDelete/"+arry.toString(),
type: "post",
success: function (data)
{
if (data>0) {
alert("删除成功!");
location.href = "/ErShi/Index";
}
}
})
}
}
</script>