0
如果我有一個按鈕:如何停止在YII按鈕中進行操作?
$this->widget('bootstrap.widgets.TbButton', array(
'label'=>'Go',
'buttonType'=>'ajaxButton',
'type'=>'primary',
'url'=>$this->createUrl('Something/Doit'),
'htmlOptions' => array(
'style' => 'width: 100%;'
),
'ajaxOptions'=>array(
'type' => 'POST',
'beforeSend' => '
function(request) {
if (wasSuccess) {
// proceed
}
else {
// execution
}
}'
,
'success' => '
function(data) {
// do stuff
}'
),
));
我如何可以編輯「wasSuccess」的一部分,因此如果wasSuccess是假的,它停止執行,並沒有真正做到與此按鈕相關的操作?
試過了。沒有工作。再試一次。有用。謝謝!我一定是第一次輸錯了! – coderama