Home > Web Front-end > JS Tutorial > If the button does not write type=button, it will cause submission when clicked_javascript skills

If the button does not write type=button, it will cause submission when clicked_javascript skills

WBOY
Release: 2016-05-16 16:56:46
Original
1080 people have browsed it

There is something very strange: I clicked a button in a pop-up window, and unexpectedly the pop-up window disappeared. After debugging by the company's js master, I discovered the secret

Copy Code The code is as follows:



Just add a type ="button":
Copy the code The code is as follows:



Different browsers Different rules are supported
Related labels:
source:php.cn
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