input

Universalattribute

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title

Eventattribute

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

AttributWerteBemerkung
Universalattribute
Eventattribute
type
  • button
  • checkbox
  • color
  • date
  • datetime
  • datetime-local
  • email
  • file
  • hidden
  • image
  • month
  • number
  • password
  • radio
  • range
  • reset
  • search
  • submit
  • tel
  • text
  • time
  • url
  • week

Beispiel

$_POST['fname']:

$_POST['']

input typeDisplay that typeChrome 9.0Opera 11.01
button
checkbox (e.g. Are you a student?)
color (e.g. Whats your favorite color?)
date (e.g. Whats your birthday?)
datetime
datetime-local
email
file (e.g. Please upload a photo)
hidden
image
month
number
password
radio
range
reset
search
speech
submit
tel
text (e.g. Whats your first name?)
time
url (e.g. Whats your home page?)
week
text x-webkit-speech

Additional attributes

email (with pattern)

search (with placeholder)

Indicate validation errors

Opera 11.01 indicates an validation error of an type="email" element like this:

Support

Currently Firefox 3.6 doesn't support many elements: button, checkbox, file, hidden, image, password, radio, reset and submit.

Internet Explorer 8.0 doesn't support many elements: