New and removed attributes in html5

First, the new properties of the form

1. Specify the autofocus attribute for the input (type="text"), select, textarea and button elements, which allows the element to automatically get the focus when the screen is opened by specifying the attribute.

2. The input and textarea elements specify the placeholder attribute, which will prompt the user's input and prompt the user's input content.

3. Input, output, select, textarea, button and fieldset specify the form attribute, declare which form it belongs to, and then place it anywhere on the page, not inside the form.

4. The input and textarea elements specify the required attribute, which means that the check is performed when the user submits, and the check element must have input content.

5. Several new attributes are added to input: autocomplete, min, max, multiple, pattern and step. At the same time, a new list element is used in conjunction with the datalist element. The datalist is used in conjunction with the autocomplete attribute. The multiple attribute allows multiple files to be uploaded at once when uploading files.

6. The input and button elements add formaction, formenctype, formmethod, formnovalidate and formtarget. They can overload the action, enctype, method, novalidate and terminate attributes of the form element, and add the disabled attribute to the fieldset element for its child elements. Set to invalid.

7. Add the novalidate attribute to the input, button, and form elements to perform relevant checks when canceling the submission, and the form can be submitted unconditionally.

8. Define a label attribute for all form elements that can use labels. The attribute value is a Nodelist object, which represents the set of label elements bound to the element.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325066947&siteId=291194637