1. Add
aria-hidden='true' data-backdrop='static'
to the outermost div of the modal box. 2. Initialize the page displayed in the modal box.
$('#myModal').modal({backdrop:'static', keyboard: false});
Among them, backgrounddrop: 'static' refers to Click on the background blank space to be closed
Keyboard: false; refers to the keyboard ESC incident without closing
The above is the detailed content of Solving the problem of blank message in bootstrap modal box in JavaScript. For more information, please follow other related articles on the PHP Chinese website!