echo CHtml::button("提交",
array(
'confirm'=>"确定要提交吗?",
'submit'=>array(),
'params'=>array(
'YII_CSRF_TOKEN' => Yii::app()->request->csrfToken,
'type'=>'cancel',
'mailid'=>$data['mail_id'],
),
'class'=>'button',
));
"YII_CSRF_TOKEN","type","mailid"的值将以POST的方式提交到该页面所对应的Contoller中的方法。
echo CHtml::button("提交",
array(
'confirm'=>"确定要提交吗?",
'submit'=>array("sendmail/cancel", 'a1' => 'a1', 'a2' => 'a2'),
'params'=>array(
'YII_CSRF_TOKEN' => Yii::app()->request->csrfToken,
'type'=>'cancel',
'mailid'=>$data['mail_id'],
),
'class'=>'button',
));
"YII_CSRF_TOKEN","type","mailid"的值将以POST的方式提交
"a1","a2",将以GET的方式提交。
提交到SendmailController中的actionCancel方法