Home > Web Front-end > HTML Tutorial > Solution to automatically submit the form and jump to other pages after pressing Enter in the web page_HTML/Xhtml_Web page production

Solution to automatically submit the form and jump to other pages after pressing Enter in the web page_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:37:38
Original
1246 people have browsed it

After pressing Enter on the web page, the form is automatically submitted and goes to other pages.

There is a query form. I originally hoped that it would be queried only when I clicked the query button. However, in the test, it went to other pages when I pressed Enter.

Copy code
The code is as follows:


...



Solution:

Add an onsubmit="search_wj();return false;" to the form

Copy code
The code is as follows:


...


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