Home >Web Front-end >JS Tutorial >When there is only one text on the page, the solution to automatic submission by pressing Enter_Form special effects

When there is only one text on the page, the solution to automatic submission by pressing Enter_Form special effects

WBOY
WBOYOriginal
2016-05-16 18:21:241061browse

The simple page html code is as follows:

Copy the code The code is as follows:



test










To fix this, try blocking Silent events, methods such as returning false will not work. Later, I checked on the Internet and found out that this is a default operation of IE (but strangely, the same situation occurs in Firefox). The solution is simple, just add a text element to the page, which can be hidden.
Statement:
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