cookieChoices = {};

Sunday, 21 July 2013

FORM TAG

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:
  1. Form tag cannot be nested inside another form tag.
  2. Input type's Button and Reset and Disabled elements name and value pairs is not submitted to the server.
  3. Input  type="button" is used only for writing client side JavaScript code.
  4. 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".
  5. 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.
  6. For the select, name of select and value of the option selected is submitted to server.
  7. select tag with size attribute is rendered as Listbox otherwise its rendered as DropDown list.
  8. If multiple options are selected in list box , then with same name different values are submitted to server.
  9. For Textarea, name of text area and value of textarea is submitted to server.
  10. Input type="Image" behaves as submit button where as <img> tag renders as static image.

No comments:

Post a Comment