如何使用Modernizr输入type = datetime? [英] How to use Modernizr for input type=datetime?

查看:146
本文介绍了如何使用Modernizr输入type = datetime?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为HTML输入字段&属性,并将其包含在我的页面上的< head> 中,但这不起作用。我还需要做什么?

I made a custom build for HTML input fields & attributes and included that on my page in the <head> but that's not working. What else do I need to do?

推荐答案

不知道你正在努力完成什么,但是输入属性选项为以下< input> 属性添加测试:自动完成 autofocus 列表占位符 max min multiple pattern 需要步骤。 - 不知道这与< input type =datetime...> 元素有什么关系?

Not sure what it is you are trying to accomplish, but the "Input Attributes" option adds tests for the following <input> attributes: autocomplete, autofocus, list, placeholder, max, min, multiple, pattern, required, and step. -- Not sure what this has to do with <input type="datetime" ...> elements?

输入类型选项确实为以下类型添加了< input> 元素的测试: 搜索 tel url 电子邮件 datetime date / strong>, month 时间 datetime-local 数字范围颜色

The "Input Types" option does adds tests for the following types of <input> elements: search, tel, url, email, datetime, date, month, week, time, datetime-local, number, range, and color.

但是,从文档中:


这些(输入)类型可以启用本地日期戳记,颜色标签,URL
验证等。如果浏览器不支持给定类型,则
将作为文本字段呈现。 Modernizr无法检测到该日期
输入创建一个日期戳,颜色输入创建一个colorpicker,
这样,它将检测输入值是基于
规范进行消毒的。

These (input) types can enable native datepickers, colorpickers, URL validation, and so on. If a browser doesn’t support a given type, it will be rendered as a text field. Modernizr cannot detect that date inputs create a datepicker, the color input create a colorpicker, and so on—it will detect that the input values are sanitized based on the spec.

一般来说,Modernizr不会做任何事情(除了HTML5垫片之外),它只允许您检测存在的现代功能。

In general, Modernizr doesn't "do" anything (besides the HTML5 shim), it just allows you to detect for the existence of modern features on the browser.

这篇关于如何使用Modernizr输入type = datetime?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆