操作对话标题

将 CSS 包含在你的代码中

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.7/css/bootstrap-dialog.min.css"/>

你的模型的 HTML 代码可以轻松显示

Click Button next to see bootstrap popup with simple message and Title and Buttons that manipulates the title.
    <button class="btn btn-primary" type="button" onclick="showModalNow()">Click Me</button>

在代码中包含以下脚本,以便轻松地使用 bootstrap-model

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.7/js/bootstrap-dialog.min.js" type="text/javascript" />
<script>
    function showModalNow(){
        BootstrapDialog.show({
            title: 'Default Title',
            message: 'First time showing Title.',
            buttons: [{
                label: 'change to Title 1',
                action: function(dialog) {
                    dialog.setTitle('Title-1');
                }
            }, {
                label: 'change to Title 2',
                action: function(dialog) {
                    dialog.setTitle('Title 2');
                }
            }]
        });
    }
</script>