Detailed explanation on the use of Bootstrap modal box
Jun 30, 2017 pm 04:28 PMModal is a subform that covers the parent form. Typically, the purpose is to display content from a separate source that can have some interaction without leaving the parent form. Subforms provide information, interaction, and more. By default, the bootstrap modal box will be closed by clicking on other blank areas (usually the mask layer), so the following method is to prohibit clicking on other areas to close the modal box.
$('#myModal').modal({backdrop: 'static', keyboard: false});
When backdrop:static, the blank space is not closed. When
keyboard:false, the esc keyboard is not closed.
The above code is also used to open the modal box.
You can also use the following method:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
The data-backdrop="static" here specifies a static background, which will not close the modal box when the user clicks outside the modal box. Data-keyboard refers to closing the modal box when the escape key is pressed. When set to false, the key is invalid.
The above is the detailed content of Detailed explanation on the use of Bootstrap modal box. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to introduce bootstrap into Eclipse

How to turn off Security Center in Windows 11

750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth

How to read the bootstrap mediation effect test results in stata

What is the difference between bootstrap and springboot

How to use bootstrap to test mediation effects

How to read the results of bootstrap mediation test
