【问题标题】:bootstrap bootboxjs modal body appear once. php [closed]bootstrap bootboxjs 模态体出现一次。 php [关闭]
【发布时间】:2015-09-17 01:45:39
【问题描述】:

正文中的模型只显示第一次,关闭模态并重新打开后模态体为空。

查看:

<a href="#del" onclick="delete();"> delete </a>

<--contend to show in modal begin-->
<div class="content-row" id="confirm" style="display:none">
       <?php function(params); ?> 
       <p><?php function(params1); ?></p>
</div>
<--contend to show in modal end-->

<--modal begin-->
<div id="bootbox-options" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
          <!-- dialog body -->
          <div class="modal-body">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
          </div>
        </div>
     </div>
</div> 
<--modal end-->

function() 根据视图返回一个字符串。

在 JS 中:

function delete() {

bootbox.dialog({
    message: $("#confirm").css("display","block"),
    title: 'TITLE',
    buttons: {
        cancel: {
            label: "<i class='fa fa-times'></i>&nbsp;&nbsp;Cancel",
            className: "btn-danger",
            callback: function() {
            }
        }
    }
});
}

有人知道我为什么丢失了以模态显示的代码吗?

【问题讨论】:

    标签: php jquery twitter-bootstrap modal-dialog bootbox


    【解决方案1】:
      function myfunc() {
            $(document).ready(function () {
                $("#myModal").modal('show');
            });
        }
    

    这就是显示模态的 JSquery

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-05
      • 2022-12-04
      • 2016-11-06
      • 2020-09-21
      相关资源
      最近更新 更多