Sunday, September 25, 2011

Form

Basic Use of FormsIf you spotted a Web page that can be used by the user to enter data, meaning that page using the form. Formed using the couples form <form> tag and </ FORM>. Two attributes that are commonly used on the form tag <form> ACTION and METHOD.• ACTION specify a URL that will be executed and accept all entries on the form. If ACTION is not specified, information will be sent to the same URL with the Web page itself.• METHOD used to determine how information is sent to the URL specified in the ACTION. Typical values ​​for this attribute in the form of GET and POST. POST making the information transmitted separately with the URL, whereas the GET will make the information sent to each URL.Entering Data with the INPUT<input> Tag is used to perform data input and its location is in <form> tag pair. There are various types of input data, which include text boxes, password boxes, radio buttons, check boxes, and SUBMIT and RESET buttons.Type TEXTTEXT type is useful for entering data such as name or address of a person. Example usage:<INPUT TYPE = "TEXT" NAME = "official_name"SIZE = "20" MaxLength = "20"In the above code, a text field named official_name formed, with the long view as many as 20 characters and a maximum number of characters that can be filled by the user for 20 pieces.SUBMIT and RESET buttonType SUBMIT on the tag <input> will form the Submit button, the button that caused the URL specified in the ACTION tag <form> will be loaded. Examples of writing code with the Submit button of the simplest is as follows:<input TYPE = "SUBMIT">In this state the button will be displayed with the inscription Submit. While that does not contain any writing on the Submit button, you need to mention it on the VALUE attribute. Example:<input TYPE = "SUBMIT" VALUE = "Kirim">As for the reset button serves to vacate or return the text field value to the default value.

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More