Skills
Four, the form of common skills
These common techniques, often associated with events and scripts, focus on functionality, and scripts are not analyzed in detail. Common techniques are: drop-down jump menus, and focus on form content.
1. Drop down Jump Menu
In Dreamweaver, it is easy to set up a Drop-down menu based on a form, which is described here to cater to the Dreamweaver user.
Sample: Drop-down jump menu based on form ChinabyteSinaNetEase
Analysis:In fact, a function is used here to jump to the selected address,
<script language= "JavaScript" >
function Formmenu (targ,selobj,restore) {
Eval (targ+ "location=" "+selobj.options[selobj.selectedindex].value+");
if (restore) selobj.selectedindex=0;
}
</script>
Then, give the Drop-down selection box an event and it's OK.
2. Focus of form content
Content focus, commonly used in the Copy&paste class website, with good words, can facilitate the user.
Sample: Content Auto Focus Move your mouse up and see if the contents are automatically selected.
Analysis: The above two events were used, email is, automatically selected is
3. Remove the space between the table and the table
Sample: Space processing for tables and forms
Table, we often use to frame the page, however, the form of the form is always the table and the contents of a gap, contrast:
Analysis:Why there is no gap on the right, look at the code on the right to know.
<table width= "100%" border= "1" cellspacing= "1" cellpadding= "1"
<tr>
<form name= "FORM3" method= "POST" "action=" ">
<td> <input type= "text" Name= "Textfield2" > <br>
<input type= "Submit" Name= "Submit22" value= "Submit"
There's no gap here. </td>
</form>
</tr>
</table>
In other words, put <form> tags in <tr> and <td> middle, corresponding </form> in the middle of </td> and </tr>!
4. Submit a form by email(for Outlook users only, not for foxmail users)
Sample:Email Submission Form
Analysis:Take a look at our form <form> tag to know that the format is as follows:
<form name= "..." action= "Mailto:xxxxx@xxx.xxx?" subject= form Feedback "enctype=" Text/plain "method=" POST "... </form>
Here's the mailto: Add the address to receive the information,? Subject is to set the default email title, enctype= "Text/plain" is necessary to indicate that the information is submitted in text, without any encryption, so this method is often used in the absence of asp/php/cgi support space, but also a proxy method, The user must have Outlook installed and is the default mail program to successfully execute the submission, and it is said that thebat! can be tested.