0
我试图通过点击按钮将选定的id传递给js。yii:在js中传递参数
我的代码是这样的:
array(
'class'=>'CButtonColumn',
'template'=>'{email}',
'buttons'=>array
(
'email' => array
(
'label'=>'Send an e-mail to this user',
'click'=>'function($data->userId){
var y=confirm("Are you sure to send mail to this user?");
if(y==true){
window.location="todoList/sendEmail/$data->userId";
}
}',
),
),
),
我在这里没能获得用户ID里面的js。
我能在这里做什么?