Ajax传值给controller:
<script type="text/javascript">
$(function(){
$('.btn_del').click(function(){
var rel=confirm('确认删除?');
if(rel){
var aa="";
$('.xz:checked').each(function(){
aa+=$(this).val()+',';
});
aa=aa.substr(0,aa.length-1);
//alert(aa);
$.ajax({
url:"{:U('index/pinpai_del_ajax')}",
type:'POST',
async:true,
dataType:"json",
data:{'id':aa},
success:function(data){
if(data.info){
alert("删除成功");
}else{
alert("请选择要删除的内容!");
}
window.location.href="{:U('index/pinpai')}&#