<sectionid="description"> Формы часто включают поле <code>input</code> , которое может использоваться для создания нескольких различных элементов управления данной формой. Атрибут <code>type</code> в этом элементе указывает, какой тип ввода будет создан. Возможно, вы заметили <code>text</code> и <code>submit</code> типы ввода в предыдущих задачах, а в HTML5 появилась опция указать поле <code>date</code> . В зависимости от поддержки браузера в поле <code>input</code> появляется окно выбора даты, когда оно находится в фокусе, что облегчает заполнение формы для всех пользователей. Для более старых браузеров тип будет по умолчанию использоваться для <code>text</code> , поэтому он помогает показывать пользователям ожидаемый формат даты на этикетке или в качестве заменителя текста на всякий случай. Вот пример: <blockquote><label for = "input1"> Введите дату: </ label><br><input type = "date" id = "input1" name = "input1"><br></blockquote></section>
<sectionid="instructions"> Camper Cat создает турнир Mortal Kombat и хочет попросить своих конкурентов посмотреть, какая дата лучше всего работает. Добавьте <code>input</code> тег с<code>type</code> атрибутом «дата», с<code>id</code> атрибута «pickdate», и <code>name</code> атрибута «дата». </section>
testString: 'assert($("input").length == 2, "Your code should add one <code>input</code> tag for the date selector field.");'
- text: Тег<code>input</code> должен иметь атрибут <code>type</code>со значением даты.
testString: 'assert($("input").attr("type") == "date", "Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.");'
- text: Ваш тег <code>input</code> должен иметь атрибут <code>id</code>со значением pickdate.
testString: 'assert($("input").attr("id") == "pickdate", "Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.");'
- text: Ваш тег <code>input</code> должен иметь атрибут <code>name</code>со значением даты.
testString: 'assert($("input").attr("name") == "date", "Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.");'