用于不同操作的JS辅助链接

时间:2012-04-29 01:49:42

标签: cakephp cakephp-2.0

我正在使用此

              echo $this->Js->submit("Send", array(
                'before'=>$this->Js->get('#sending')->effect('fadeIn'),
                'success'=>$this->Js->get('#sending')->effect('fadeOut'),
                'update'=>'#success'                            
                    )); 

这是在index.ctp和onclick中它转到控制器中的索引操作。但我希望它能采取不同的行动。我怎么做的 感谢

1 个答案:

答案 0 :(得分:0)

搞定了

需要一个url数组来执行不同的操作

 echo $this->Js->submit("Send", array(
'before'=>$this->Js->get('#sending')->effect('fadeIn'),
'success'=>$this->Js->get('#sending')->effect('fadeOut'),
'update'=>'#success',
'url' => array(
     'action' => 'pp'
         ),                     
)); 
相关问题