FORM Tag:
<form action="URL" method="post"..>
<input name="n1" type="text/password/submit/reset/button/checkbox/radio/hidden/file/image"..>
<textarea name="t1"/>
.......................
.....................
</form>
Notes:
- Form tag cannot be nested inside another form tag.
- Input type's Button and Reset and Disabled elements name and value pairs is not submitted to the server.
- Input type="button" is used only for writing client side JavaScript code.
- Input type="Checkbox" submits name and value pairs only if checkbox is checked otherwise nothing is submitted. If value is not provided the default value posted is "on".
- To group radio buttons , same name must be given to them. And only the name-value pair of radio-button selected will be submitted to server.
- For the select, name of select and value of the option selected is submitted to server.
- select tag with size attribute is rendered as Listbox otherwise its rendered as DropDown list.
- If multiple options are selected in list box , then with same name different values are submitted to server.
- For Textarea, name of text area and value of textarea is submitted to server.
- Input type="Image" behaves as submit button where as <img> tag renders as static image.
No comments:
Post a Comment