【发布时间】:2020-11-26 15:51:54
【问题描述】:
我正在使用以下代码。
[
'attribute' => 'Application',
'format' => 'html',
'value' => function ($dataProvider) {
$student_username = $dataProvider->student_username;
return Html::a('Print', Url::toRoute(['/coordinatorpanel/print-form', 'student_username' => $student_username]),
['target' => '_blank', 'class' => 'btn btn-success center-block']);
},
]
HTML 输出:
<a class="btn btn-success center-block" href="/nse/frontend/web/index.php?r=coordinatorpanel%2Fprint-form&student_username=COR39690113" target="_blank">
但是,当我点击链接时,我没有导航到新选项卡,请求在同一个选项卡中处理。我在“Mozilla”和“Chrome”上都试过这个。
任何帮助都会得到深深的回报:)
【问题讨论】: