Easy to play the pattern form (iv) Common skills

Source: Internet
Author: User
Tags dreamweaver
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:

There's a gap here.

There's no space here.

   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
Theme:
Content:

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.