我需要使用链接而不是在 JS 助手中提交。不幸的是,我的提交代码工作正常,但是当我尝试通过将 $this->Js->submit 更改为 $this->Js->link 将相同的代码从提交切换到链接时,它不起作用
这有效
echo $this->Js->submit("Delete", array(
'before'=>$this->Js->get('#sending')->effect('fadeIn'),
'success'=>$this->Js->get('#sending')->effect('fadeOut'),
'update'=>'#success',
'url' => array(
'action' => 'delete',$team['Team']['id']
),
));
这不起作用
echo $this->Js->link("Delete", array(
'before'=>$this->Js->get('#sending')->effect('fadeIn'),
'success'=>$this->Js->get('#sending')->effect('fadeOut'),
'update'=>'#success',
'url' => array(
'action' => 'delete',$team['Team']['id']
),
));