0
我有一列gridview。這是下面的代碼:jQuery點擊渲染頁面yii2
[
'format' => 'raw',
'value' => function ($model) {
return "<p class='feedback'>" . $model->KOMENTAR . "</p><br><p class='feedback-date'>" . $model->TANGGAL . "</p><hr><div id='replay-" . $model->ID_KOMENTAR . "'><ul></ul><div id='replay-column'></div></div>";
},
]
這是jQuery的我寫的:
$("#replay-to-"+ID_KOMENTAR).on("click", function(){
//and this is the wrong code
//$.get('index.php?r=feedback/feedbacktest',null, function(data){
// $('#replay-column').append(data);
//});
});
我想渲染頁面時,按一下按鈕,我嘗試了一些代碼,但它只是得到錯誤
<?= $this->render('feedback_form', [
'model' => $model,
]) ?>