Home > Web Front-end > Layui Tutorial > Layui pop-up layer crash solution

Layui pop-up layer crash solution

Release: 2020-06-16 17:09:15
forward
3916 people have browsed it

Layui pop-up layer crash solution

Today I used layui’s pop-up layer plug-in and found that binding the pop-up layer to a button would crash when opening the pop-up window.

Reason: The Button button is used in the form. When clicked, the default event will be triggered, but I did not fill in the action of the form, so the pop-up layer will crash!

Solution:

Method 1: Replace the button label with another label, such as span, and there will be no crash problem;

Method 2: Specify the button Type: type = "button", because the default type of button in the form is = "submit". If it is changed to button, there will be no default event of the form.

For more informationlayui, please pay attention to the layui tutorial column on the PHP Chinese website

The above is the detailed content of Layui pop-up layer crash solution. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:oschina.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template