如何在某个按钮上触发 bootstarp Modal 组件
1 <?php Modal::begin([ 2 'id'=>'myModal', 3 'header' => '<h2>标题</h2>']); 4 echo '内容'; 5 Modal::end();?>
这里只需要设置 'data-target'=>'#myModal','data-toggle'=>'modal'
1 <?=Html::submitButton('<b>登录</b>', [ 'data-target'=>'#myModal', 'data-toggle'=>'modal']) ?>