'editableOptions'=>[
'name'=>'type',
'inputType' => kartik\editable\Editable::INPUT_DROPDOWN_LIST,
'data'=>$parent,
'pluginEvents' => [
'editableSuccess' =>"function(event, val) {
var list = '".json_encode($type)."';
var obj = jQuery.parseJSON(list);
for(var item in event.target.children){
if(item == 0){
event.target.children[item].innerText = 'hello'; //console.log(event.target.children[item].textContent);
}
}
}",
]
],
console.log值是对的,但是我的浏览器显示错误的值,而不是"你好"值。错误在哪里?