Five practical tips for web form design

Five practical tips for web form design

1. Mobile selection of form text input: In the text input field, if a prompt is added, visitors often have to select and delete it with the mouse, and then enter useful information. In fact, as long as you add onMouseOver="this.focus()" onFocus="this.select()" code to <textarea>, everything will become much simpler, such as:

The following is the quoted content:
<textarea name=textarea wrap=virtual rows=2 cols=22 onMouseOver="this.focus()" onFocus="this.select()">Please fill in your name</textarea>
Similarly, you can add code to <input>.
2. Click to delete the form input unit: This column has a similar function to the above one, but there is a slight change in the use of the mouse. It needs to be clicked instead of just covering with the mouse like the above one. like:
The following is the quoted content:

<input type=text name="address" size=19 value="Please fill in your email" onFocus="this.value=''">
After clicking the input unit, the prompt information will be deleted. Isn’t it convenient?
3. Border setting of form input unit: Changing the traditional form unit border will make your homepage more colorful. like:
The following is the quoted content:

<input type=radio name=action value=subscribe checked style="BORDER-BOTTOM: dashed 1px; BORDER-LEFT: dashed 1px; BORDER-RIGHT: dashed 1px; BORDER-TOP: dashed 1px;background-color: #FEF5C8">
Among them, "style=***" is the left, right, top, bottom and background color settings, which are applicable to other units.
4. Text settings of form input cells: The font of cells in the form can be modified, such as:
The following is the quoted content:

<input type=text name="address" size=19 value="Please fill in your name" style=font-family:"verdana";font-size:10px >
Among them, "style=***" is the font and font size settings.
5. Change the form properties to a pop-up window: After most forms are activated, they will be opened in the current page, affecting normal browsing. It is better to modify it, such as:
The following is the quoted content:
<form method=POST action=url target=_blank>
"target=_blank" is used to control the opening of the pop-up window.

<<:  Pure HTML and CSS to achieve JD carousel effect

>>:  Difference and implementation of JavaScript anti-shake and throttling

Recommend

Three ways to achieve background blur in CSS3 (summary)

1. Normal background blur Code: <Style> htm...

Example of how to implement underline effects using Css and JS

This article mainly describes two kinds of underl...

MySQL daily statistics report fills in 0 if there is no data on that day

1. Problem reproduction: Count the total number o...

The role of MySQL 8's new feature window functions

New features in MySQL 8.0 include: Full out-of-th...

Two solutions for automatically adding 0 to js regular format date and time

Table of contents background Solution 1 Ideas: Co...

Vue implements table paging function

This article example shares the specific code of ...

JavaScript to achieve simple provincial and municipal linkage

This article shares the specific code for JavaScr...

Complete steps to install FFmpeg in CentOS server

Preface The server system environment is: CentOS ...

JavaScript ES new feature block scope

Table of contents 1. What is block scope? 2. Why ...

The best solution for implementing digital plus and minus buttons with pure CSS

Preface: For the implementation of digital additi...

Detailed explanation of the implementation of nginx process lock

Table of contents 1. The role of nginx process lo...

How to add Lua module to Nginx

Install lua wget http://luajit.org/download/LuaJI...

Detailed method of using goaccess to analyze nginx logs

Recently I want to use goaccess to analyze nginx ...

Example code for realizing charging effect of B station with css+svg

difficulty Two mask creation of svg graphics Firs...

Detailed explanation of the benefits of PNG in various network image formats

BMP is an image file format that is independent o...