Home Web Front-end HTML Tutorial Simple implementation of 'Enter!=Submit' (remove the form's Enter to submit)_html/css_WEB-ITnose

Simple implementation of 'Enter!=Submit' (remove the form's Enter to submit)_html/css_WEB-ITnose

Jun 24, 2016 pm 12:02 PM
remove Enter submit Simple form

-------------------------------------------------- -------------------------------------------------- ----

To realize the problem of "Enter!=Submit", you can generally start from the "type of button" and "number of input boxes".

---------------------------------@chenwei ---- -----------------------------

By default, a single input box, regardless of the button's type="submit" or type="button" type, press Enter to submit.

1. When type="submit", no matter how many type="text" input boxes there are, pressing Enter means submission. (submit)

2. When type="button", and there are multiple input boxes, press Enter not to submit. (button)

3. To solve the problem of pressing Enter to submit a single input box, refer to the second point: you can add an input="text" and hide it; then the type is button.

In actual applications, there is rarely only one input box, so you only need to remember the second item to deal with it.

Using JS events to prevent form submission is beyond the scope of this article, but of course it can be implemented.

-------------------------------------------------- -------------------------------------------------- ----

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to get rid of arrow icons for shortcuts on Windows 11 How to get rid of arrow icons for shortcuts on Windows 11 Dec 28, 2023 am 10:39 AM

After many users use the latest win11 system, a small arrow appears on the shortcut icon on the desktop, which affects the appearance. Therefore, we have brought you a tutorial to remove the small arrow from the win11 shortcut icon. If you also think it does not look good, come and watch it. Let’s see how it works. How to remove the small shortcut arrow in win11: 1. First, press the "win+r" shortcut keys on the keyboard at the same time. 2. Then open "Run", enter the "regedit" command, and click the "OK" button. 3. Next, enter the "Registry Editor" page and click to open: HKEY_CLASSES_ROOT\lnkfile (can be copied and pasted). 4. After re-entering, right-click "lsShortcut" and select

The easiest way to query the hard drive serial number The easiest way to query the hard drive serial number Feb 26, 2024 pm 02:24 PM

The hard disk serial number is an important identifier of the hard disk and is usually used to uniquely identify the hard disk and identify the hardware. In some cases, we may need to query the hard drive serial number, such as when installing an operating system, finding the correct device driver, or performing hard drive repairs. This article will introduce some simple methods to help you check the hard drive serial number. Method 1: Use Windows Command Prompt to open the command prompt. In Windows system, press Win+R keys, enter "cmd" and press Enter key to open the command

How to remove watermark with Scanner How to remove watermark with Scanner Mar 05, 2024 pm 05:34 PM

Removing watermarks is a useful tool in the software Scanner. Some users are not sure how to remove watermarks in Scanner. You can click Remove Watermark in Edit PDF on the save interface to close it. Next, the editor will explain Users brought us an introduction to how to remove watermarks. If you are interested, come and take a look! Scanner King usage tutorial How to remove the watermark with Scanner King? Answer: You can click on the save interface to edit the watermark removal in the PDF. Details: 1. Enter the software and click the [Camera] icon. 2. Photograph and scan the documents that need to be watermarked. 3. Click [→] to proceed to the next step. 4. After completing editing, click [✓]. 5. Click [Edit PDF]. 6. Select [Remove Watermark] below.

How to remove mosaic How to remove mosaic How to remove mosaic How to remove mosaic Feb 22, 2024 pm 03:22 PM

Use the imitation stamp to pick up the color of the picture and then apply it. Tutorial Applicable Model: Lenovo AIO520C System: Windows 10 Professional Edition: Photoshop 2020 Analysis 1 First enter PhotoShop and open the mosaic picture. 2In the toolbar on the left, find and click Clone Stamp. 3 Then press and hold the Alt key on the keyboard. 4. Move the mouse to pick the color in the picture. 5Then release the Alt key on the keyboard. 6Finally, use the mouse to smear on the mosaic area to eliminate the mosaic. Supplement: What is the principle of mosaic removal? 1. If you want to remove mosaic from a picture, it is equivalent to painting on a canvas with an outline. Although the color aspect is easier to handle, it is still very difficult to complete. because

How to remove the word 'Qingyan' on Qingyan Camera How to remove the word 'Qingyan' on Qingyan Camera Mar 30, 2024 pm 02:51 PM

How to remove the word "Qingyan" from Qingyan Camera? When taking photos with Qingyan Camera APP, the word "Qingyan" will be left behind. Many friends don't know how to remove the word "Qingyan". Next, the editor brings the word "Qingyan" to the players. Tutorial on how to remove the word "light face" on the face camera. Interested players should come and take a look! Qingyan Camera usage tutorial: How to remove Qingyan characters from Qingyan Camera 1. First unlock the phone and enter the desktop, find the [Qingyan Camera] APP and open the entry page; 2. Then jump to the main page of the Qingyan Camera APP and click on the upper left corner [Circle] button; 3. Then the multi-function menu bar will expand at the top, select [Camera Settings]; 4. Finally, find the button behind [Watermark Settings] as shown in the picture below and slide it to dark color to remove it.

How to write a simple online reservation system through PHP How to write a simple online reservation system through PHP Sep 26, 2023 pm 09:55 PM

How to write a simple online reservation system through PHP. With the popularity of the Internet and users' pursuit of convenience, online reservation systems are becoming more and more popular. Whether it is a restaurant, hospital, beauty salon or other service industry, a simple online reservation system can improve efficiency and provide users with a better service experience. This article will introduce how to use PHP to write a simple online reservation system and provide specific code examples. Create database and tables First, we need to create a database to store reservation information. In MyS

How to use JavaScript to implement real-time verification of the input box content of a form? How to use JavaScript to implement real-time verification of the input box content of a form? Oct 18, 2023 am 08:47 AM

How to use JavaScript to implement real-time verification of the input box content of a form? In many web applications, forms are the most common way of interaction between users and the system. However, the content entered by the user often needs to be validated to ensure the accuracy and completeness of the data. In this article, we will learn how to use JavaScript to implement real-time verification of the content of the form's input box and provide specific code examples. Creating the form First we need to create a simple table in HTML

How to write a simple student performance report generator using Java? How to write a simple student performance report generator using Java? Nov 03, 2023 pm 02:57 PM

How to write a simple student performance report generator using Java? Student Performance Report Generator is a tool that helps teachers or educators quickly generate student performance reports. This article will introduce how to use Java to write a simple student performance report generator. First, we need to define the student object and student grade object. The student object contains basic information such as the student's name and student number, while the student score object contains information such as the student's subject scores and average grade. The following is the definition of a simple student object: public

See all articles