return CHtml::ajaxLink($this->statusIconFormat,
Yii::app()->createUrl('backend/feedbacks/changeStatus'),
array(
'type' => 'POST',
'data' => 'id=' . $this->id,
'dataType' => 'text',
'update' => '#yt1',
)
);
以下代码生成的 JS 语句如下
jQuery(document).ready(function() {
jQuery('#yt1').click(function(){jQuery.ajax({'type':'POST','data':'id=22','dataType':'text','url':'/dot/index.php?r=backend/feedbacks/changeStatus','cache':false,'success':function(html){jQuery("#yt1").html(html)}});return false;});
});
在 ajaxLink 中有一个 update 定义,这个应该是定义对象 id 的吧?看 js 代码生成的是以 yt1 之类的 id 值。请问我怎么在 CHtml::ajaxLink 定义时知道即将生成的 id 值是多少?