Частный вебмастер Услуги Контакты Справочная информация Статьи и публикации Полезные сервисы Букварь вебмастера
   Букварь вебмастера

Атрибут TYPE (for button)



The author can define a button that will have UI that indicates default for the ENTER key (a dark border), and a button that will have default behavior for the ESC key.

BUTTON Command Button.

RESET RESET is a button that when pressed resets the form's fields to their specified initial values. The label to be displayed on the button may be specified just as for the SUBMIT button.

SUBMIT SUBMIT is a button that when pressed submits the form. You can use the VALUE= attribute to provide a non- editable label to be displayed on the button. The default label is application-specific. If a SUBMIT button is pressed in order to submit the form, and that button has a NAME= attribute specified, then that button contributes a name/value pair to the submitted data. Otherwise, a SUBMIT button makes no contribution to the submitted data.

Default key bindings will exist for:
<linput type=submit> - Enter key
<button type=submit> - Enter key
<button type=reset> - ESC key
<input type=reset >- ESC key

Default behavior is scoped to the form, or the document - if the focus is in the form, only the submit button within that form has a bold border and will fire a click event if ENTER is hit. (or in the case of ESC, the reset button within the form would fire a click event) If focus is on the document, only the default button on the document (if, of course, there is one) will appear with a bold border - and if the user hits ENTER, the default button for the document will fire a click event. And with focus on the document the ESC key will fire the onclick handler for a reset button that exists on the document.

Applies To


Смотрите далее: URL »

  Атрибуты HTML