In bootstrap, the attributes of the modal box and modal box are as follows:

Source: Internet
Author: User

In bootstrap, the attributes of the modal box and modal box are as follows:

You can see if the modal box is needed in the work.

<Div class = "modal fade" id = "userModal" tabindex = "-1" role = "dialog" aria-labelledby = "myModalLabel" aria-hidden = "true" data- backdrop = "static" data-keyboard = "false"> <div class = "modal-dialog"> <div class = "modal-content"> <div class = "modal- header "> <button type =" button "class =" close "data-dismiss =" modal "aria-hidden =" true "id =" btnCancel "> & times; </button> 

 

The modal box has an attribute to prevent the modal box from being closed by clicking the mask layer. Is the data-backdrop = "static" set in the div ". This prevents the modal box from being closed due to a sudden misoperation when the content is entered in the modal box.

Another attribute is data-keyboard = "false ". In this case, it is set to press the ESC return key, which is invalid. It is also used to prevent the modal box from being closed due to sudden misoperations.

 

 

<Div id = "toolbar" class = "btn-group"> <button id = "btn_add" type = "button" class = "btn-newAdd" data-toggle =" modal "data-target =" # userModal "> <span class =" glyphicon-plus "aria-hidden =" true "> </span> added </button> <button id = "btn_edit" type = "button" class = "btn-newAdd"> <span class = "glyphicon-edit" aria-hidden = "true"> </span> modify </button> <button id = "btn_delete" type = "button" class = "btn-newAdd"> <span class = "glyphicon-remove" aria-hidden = "true"> </span> Delete </button> </div>

The data-toggle = "modal" data-target = "# userModal" button attribute opens the modal box.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.