This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13672|Reply: 0

[Bootstrap] Bootstrap modal box to load pages remotely

[Copy link]
Posted on 7/17/2017 2:58:23 PM | | | |


As shown in the image above, I am using the Bootstrap modal box to load the page data remotely

First, the HTML code for our main page is as follows:



The js code is as follows:



The page code for the remote loading is as follows:



Note that if we use the above code, the modal box will only be loaded once, we want to close the modal box and open it again, to reload the data, we also need to add the following code:



End.

Summary:

There are a few misunderstandings, it should be noted that although it is a modal box that loads data remotely, the modal box and the main page are a same-level relationship, not a parent-child relationship, so it is best not to have the same id and name of input

The modal box can then directly call the js code of the main page.




Previous:Did Hammer Technology Big Bang plagiarize Zhong Yingpin?
Next:php gets the header parameter of the request
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com