Wednesday, 18 December 2013

INPUT


input

A form element that can be represented as a text box, password text box, check box, radio button, submit button, reset button, hidden input field, image (which acts as a submit button), file selection box or general button.

Attributes
  • name can be used so that the value of the element can be processed.
  • type can be used to specify the type of input. Values can be text (default), password, checkbox, radio, submit, reset, hidden, image, file or button.
  • value can be used to specify the initial value. It is required when type is set to checkbox or radio. It should not be used when type is set to file.
  • checked can be used when type is set to checkbox or radio to set the initial state of a check box or radio button to be selected. It must be used in the format checked="checked".
  • maxlength can be used to specify the maximum number of characters allowed in a text box.
  • src can be used when type is set to image to specify the location of an image file.
  • alt can be used when type is set to image to specify the alternative text of the image, which should be a short description.
  • accept can be used when type is set to file to specify which file-types should be accepted. This is a comma-separated list of MIME types.
  • disabled can be used to disable an element. It must be used in the format disabled="disabled".
  • readonly can be used to specify that the value of the element can not be changed. It must be used in the format readonly="readonly".
  • accesskey can be used to associate a keyboard shortcut to the element.
  • tabindex can be used to specify where the element appears in the tab order of the page.
Example

<form action="somescript.php" />
        <p>Do you like pie?</p>
        <div>yes <input type="radio" name="pie" value="yes" checked="checked" /></div>
        <div>no <input type="radio" name="pie" value="no" /></div>
        <div>Your name: <input type="text" name="name" /></div>
        <div><input type="image" name="submitimage" src="someimage.gif" /></div>
</form>

No comments:

Post a Comment

Physics basic inventions and inventors

1.Which instrument is used to measure altitudes in aircraft's ? Audiometer Ammeter Altimeter Anemometer Explanation : ...