:[JavaScript]View Plaincopyprint?
$ ("#myModal"). On ("hidden", function () {
$ (this). Removedata ("modal");
});
You can also remove the data before you open the dialog box, the effect is the same.Note: The above code is based on Bootstrap v2, if you use Bootstrape v3, the modal dialog's HTML and event notation are somewhat different, fo
The Bootstrap modal dialog box for the front-end frame allows you to specify a URL using the remote option so that the dialog box will automatically load data from this address at the first pop-up to. Modal-body, but it will only be loaded once, but by invoking the The Removedata () method can solve this problem.Bootst
The Bootstrap modal dialog box for the front-end frame allows you to specify a URL using the remote option so that the dialog box will automatically load data from this address at the first pop-up to. Modal-body, but it will only be loaded once, but by invoking the The Removedata () method can solve this problem.1.
Describes how to load bootstrap modal-remote [enhancement] And bootstrapmodal.
Method 1:
Usage Link
When you click this connection, the content of demo. jsp can be dynamically loaded to
Method 2:
Script
$("#myModal").modal({ remote: "page.jsp" });
However, after load
to use the shown.bs.modal if we need to be able to get the focus on each display modal window.
The modal window also provides le three parameters:
1.toggle Toggle Modal window display hidden
2.show Display modal window
3.hide Hidden Modal window
Used in the following w
the flick?
Click
on the Display window $ (' #btn '). On (' click ', Function () {
$ (' #myModal '). Modal (' show ');
};
4. The event The Modal box supports 4 kinds of time, respectively corresponding to eject before, eject, before and after closing.
$ (' #myModal '). On (' Show.bs.modal ', function () {
alert (' triggered immediately when the Show method calls! ');
});
$ ('
support% height: "500",// Window height, do not support% backdrop:true,//whether to show the barrier, and the original bootstrap modal box as keyboard:true,//whether to open the ESC key exit, and the native bootstrap modal box as Remote: "",//Load
No more about Bootstrap. The Bootstrap self-built Modal Dialog Box plug-in is easy to use. You only need to define html in the following format, trigger it with js, or trigger it with a common html element that specifies the data attribute, the latter example is as follows:
[Html]
View the source code of Bootstrap 2.3
Shows the modal when initialized.
Remote
Path
False
If a remote URL is provided, content would be loaded via JQuery's method and injected into the load .modal-body . If you have the using the data API, you may alternatively with the href tag to specify the
The Modal plug-in that is required by Bootstrap every day. The Modal is a child form that overwrites the parent form. Normally, the purpose is to display the content from a separate source. Some interactions can be made without leaving the parent form. Subforms provide information and interaction. If you are interested, refer to the mode box plug-in
The example of this article for everyone to share the use of bootstrap modal and click on the outside to disappear the solution, for your reference, the specific content as follows
1. Code:
Of course, you can also use JS to control.
The following code:
Showing:$ (' #myModal '). Modal (' show ');
Hidden:$ (' #myModal ').
The Modal box class of Bootstrap provides some events for listening and executing your own code.Event Type descriptionThe event is triggered immediately after the Show.bs.modal Show method call. If you click on an element that is a trigger, this element can be accessed through the Relatedtarget property of the event.Shown.bs.modal This event is triggered after the modal
Bootstrap modal frame Remote loading Web page methodThis method is given in the Bootsrap modal box document:Using link modeUsing script mode:$ ("#modal"). Modal ({ "tieniu.php"});No instances are given, and there are some detai
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.