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
1. Preparation After installing the Linux operati...
The specific code is as follows: <div id="...
Scenario simulation: Some domestic companies need...
Use apk add ansible to add the ansible service to...
Today I had a sneak peek at IE8 beta 1 (hereafter...
A sophomore asked me how to install and configure...
Vue+iview menu and tab linkage I am currently dev...
You may often see the following effect: That’s ri...
Table of contents MutationObserver API Features I...
Preview address: https://ovsexia.gitee.io/leftfix...
Preface A few days ago, I came across the feature...
conda update conda pip install tf-nightly-gpu-2.0...
1. Basic Concepts 1. Sitemesh is a page decoratio...
JavaScript scripts can be embedded anywhere in HT...
By default, Flash will always be displayed at the ...