This article describes how to beautify html form controls using css (Form beautification). For more information, see section 1. Basic syntax structure of html submit and bottom buttons.
1. html submit button
Set type = "submit" in the input label to set this form control as a button.
Code of the submit button:
The Code is as follows:
Submit button Effect
Html submit button Effect
2. html bottom button
You can also set type = "bottom" in the input label to set this form control as a button.
Bottom button code:
The Code is as follows:
Bottom button:
Html botton button Effect
Ii. Differences between html submit and bottom buttons
Type = button is simply a button Function
Type = submit is the sending form
However, people engaged in web ui should note that using submit to improve the ease of use of pages:
After submit is used, the page supports the enter key operation. Many WEB software designers may not notice that the submit is unified.
After a button is used, the page usually does not support the enter key. Therefore, the enter key must be supported and a submit must be set. The default enter key is used to operate the first submit on the page.
The Code is as follows:
After onClick is executed, go to action. OnClick is not required for automatic submission. So onclick can be avoided here.
The Code is as follows:
After onClick is executed, the jump file is controlled in the js file. OnClick is required for submission.
For example:
1. onclick = "form1.action = 'a. jsp '; form1.submit ();" This enables the submit function.
2. button code
The Code is as follows:
Button
3. Button HTML code
The Code is as follows:
OnClick = "javascript: windows. location. href =" your url "">
3. html submit and bottom buttons to beautify css p Layout
First, prepare the button image for button beautification, and add a class style to the input submit or bottom button control. Set the button background to beautify the image, and set the border to zero, width, and height.
1. Beautify html bottom buttons
1) image materials
Save images as needed
Beautify image button Material
2) corresponding to the complete HTML source code:
The Code is as follows:
Button beautification demo on-line -www.css. com
3) bottom Effect
Bottom beautification Effect
2. Beautify the html submit button
1) image materials
Save images as needed
Right-click an image clip and choose Save as needed.
2) corresponding to the complete HTML source code:
The Code is as follows:
Submit button beautification on-line demonstration -www.css. com
3) submit button Effect
Effect after html submit beautification