<INPUT ...>

Usage Recommendation
thumbs up use it

  • TYPE: what type of field
  • NAME: name of this form field
  • VALUE: initial or only value of this field
  • SIZE: how wide the text field should be
  • MAXLENGTH: maximum number of characters
  • CHECKED: check this checkbox or radio button
  • BORDER: border around image
  • SRC: URL of image
  • ALT: text to show if you don't show the picture
  • LOWSRC: a version of the picture that isn't such a big file
  • WIDTH: width of image
  • HEIGHT: height of image
  • ALIGN: how text should flow around the picture
  • VSPACE: vertical distance between the picture and the text
 
  • HSPACE: horizontal distance between the picture and the text
  • READONLY: the value of this field cannot be changed
  • DISABLED: don't let the user do anything with this field
  • ACCESSKEY
  • TABINDEX: tab order
  • LANGUAGE: scripting language to use
  • onClick: when the user clicks here
  • onChange: when this field is changed
  • onFocus: when this field gets the focus
  • onBlur: when this field loses the focus
  • onKeyPress: script to run when a key is pressed
  • onKeyUp: script for when a key goes up while the field has the focus
  • onKeyDown: script for when a key goes down while the field has the focus
  • AUTOCOMPLETE: If the browser should use autocompletion for the field

<INPUT ...> creates the data entry fields on an HTML form. (Well, it creates most types of fields, <TEXTAREA ...> and <SELECT ...> also create some, as does the new <BUTTON ...> tag.) The TYPE attribute establishes what type of field the input is creating. The other <INPUT ...> attributes affect different types of inputs different ways (or not at all). So let's jump straight into the TYPE attribute and look at the different types of input fields.





About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.