在view文件中,
$this->widget(
'CTreeView',
array(
'data'=>array(
array(
'id'=>'1',
'text'=>'parent-node',
'htmlOptions'=>array(
'onclick'=>'alert("from parent-node");'
),
'hasChildren'=>'true',
'children'=>array(
array(
'id'=>'101',
'text'=>'child-node',
'htmlOptions'=>array(
'onclick'=>'alert("from child-node");'
)
)
)
)
)
)
);
点击child-node,首先是child-node响应该click事件,接着运行parent-node的click事件。
请教各位高人,如何阻止parent-node响应发生在child-node上的click事件,同时保留对其自身的click响应呢?
多谢, 呵呵