1

このモーダル内にテキスト フィールドと入力を追加したいのですが、BootstrapDialog ではそれを行うことができません。ライブラリを変更せずに行うにはどうすればよいですか? ところで、$.ajax(); を使用できますか? 中身?

<button class="btn btn-primary" id="add_item">New item</button>

jquery

$('#add_item').on('click',function(){
    BootstrapDialog.confirm({
        message: 'Hi Aaron Imperial'
    });
}); 
4

4 に答える 4

1

以下のコードを試すことができます:

BootstrapDialog.show({
            title: 'Modal Title',
            message: $('<textarea class="form-control" placeholder="Try to input multiple lines here..."></textarea>'),
            buttons: [{
                label: 'Button name',
                cssClass: 'btn-primary',
                hotkey: 13, // Enter.
                action: function() {
                    alert('You pressed Enter.');
                }
            }]
        });
于 2016-09-02T05:43:45.167 に答える
1

Javaスクリプトでも簡単に動作します一度試してみてください

document.getElementById('DialougeID').innerHTML = '<input type=\"text\"/>';
于 2016-09-02T05:44:07.267 に答える