Reprinted from: http://blog.onlygrape.com/css-form-layout/267
1. Mobile selection of form text input:
in In the text input field, if a prompt is added, visitors often have to use the mouse to select it, delete it, and then enter useful information.
In fact, as long as you add onMouseOver="this.focus()" onFocus="this.select()" code to
< ; textarea name =textarea wrap =virtual rows =2 cols =22 onMouseOver =”this.focus()” onFocus =”this.select()” > Input English.. textarea >
Similarly, you can add code to .
2. Click to delete the form input unit:
This column has the same function as above, but there are slight changes in using the mouse. It requires clicking rather than just mouse coverage like above. Such as:
< input type =text name =”address” size =19 value =”Enter,e-mail…” onFocus=”this.value=”” >
After clicking the input unit, the prompt information will be deleted, isn’t it very convenient?
3. The border setting of the form input unit:
Change the traditional one. Form unit borders will make your homepage more colorful, such as:
< 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″ >
The "style=***" is the left, right, top, bottom and background color settings, applicable to other Unit, please try it yourself
4. Text setting of form input unit:
The font of the unit in the form can be modified, such as:
< input type =text name =”address” size =19 value =”Enter,e-mail…” style =font-family:”verdana”;font-size:10px >
Among them, "style=***" is the font and font size settings.
5. Modify the form properties to a pop-up window:
After most forms are activated, they will pop up. Open in the current page, which affects normal browsing. It is better to modify it, such as:
< form method =POST action =url target =_blank >
where "target=_blank" is controlled in The pop-up window opens.