Copy code The code is as follows:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <form action="http://www.baidu.com"> <input type="text" name="name"/> <input type="button" onclick="javascript:void(0)" value="Submit"> </form> </body> </html> As shown in the above form, when you press Enter in the name input box, the form will be submitted. And there is no submit button in the form. After much searching I finally found the reason: If there is only one text box in the form, the form will be submitted when you press Enter. So the solution is easy, just add a useless text box and hide it. Copy code The code is as follows:<input type="text" style='display:none' /> Note: It is not possible to add a hidden box. Copy code The code is as follows:<input type="hidden" /> |
<<: Solve the mysql problem: Unable to continue code execution because MSVCR120.dll is not found
>>: CSS method of clearing float and BFC
summary During the interview, when discussing abo...
Prerequisites To run containers on Windows Server...
Data integrity is divided into: entity integrity,...
Table of contents mysql log files binlog Binlog l...
1. Introduction This article mainly explains how ...
Table of contents 1. Process 2. Core Architecture...
Table of contents BOM (Browser Object Model) 1. W...
1. iframe definition and usage The iframe element...
Table of contents $nextTick() $forceUpdate() $set...
This article summarizes various ways to implement...
1. What is semanticization? Explanation of Bing D...
Prepare a CentOS6 installation disk (any version)...
Table of contents Preface Laying the foundation p...
1. Shut down the mysql service # service mysqld s...
Table of contents 1. Background 2. Prerequisites ...