这是我的jquery函数,它不起作用,
$(document).on('click',"#btn_submit",function(){
$('.task_members_'+$(this).parent().parent().find('.j').val()).val(selectedImgsArr);
var select_status = ("#label_task").val();
var j = $(".j").attr('value');
var url = "<?php echo $this->Url->build(array('controller' => 'dashboards','action'=>'addarraysessionproject'))?>";
$.ajax({
type: "POST",
url: url,
async : false,
data: {
array_user : selectedImgsArr,
array_status : custom_array,
select_status : select_status,
'j': j
},
success:function(data){
}
});
$('.close').click();
});
请让我知道我哪里出错了。
答案 0 :(得分:1)
试试这个,我认为它在行var select_status上的错误
$(document).on('click',"#btn_submit",function(){
$('.task_members_'+$(this).parent().parent().find('.j').val()).val(selectedImgsArr);
var select_status = $("#label_task").val();
var j = $(".j").attr('value');
var url = "<?php echo $this->Url->build(array('controller' => 'dashboards','action'=>'addarraysessionproject'))?>";
$.ajax({
type: "POST",
url: url,
async : false,
data: {
array_user : selectedImgsArr,
array_status : custom_array,
select_status : select_status,
'j': j
},
success:function(data){
}
});
$('.close').click();
});