[英]Does anyone know where I can find this HTML code?
I'd like 3 SELECT boxes that allow people to select the month, day, and year. 我想要3个SELECT框,允许人们选择月,日和年。 I'm sure there are HTML pre-sets like this, right? 我确定有这样的HTML预设,对不对?
January 5 2006
And the user can select the date, which is just option boxes. 用户可以选择日期,这只是选项框。
Why not use a jQuery Date picker ? 为什么不使用jQuery日期选择器 ?
Note: I am searching for the old school date picker which you asked. 注意:我正在搜索您要求的旧学校日期选择器。 Will be back soon. 即将回来。
Edit: This page has a similar html code which you are looking for. 编辑: 此页面具有您要查找的类似html代码。
You should use the html 5 <input type="date" />
then degrade gracefully for browsers that do not support it yet. 您应该使用html 5 <input type="date" />
然后对尚不支持它的浏览器进行适当降级。
To degrade gracefully use the following code, taken from diveintohtml5 here . 要优雅地降级,请使用以下代码,该代码取自diveintohtml5这里 。
<form>
<input type="date">
</form>
...
<script>
var i = document.createElement("input");
i.setAttribute("type", "date");
if (i.type == "text") {
// No native date picker support :(
// Use Dojo/jQueryUI/YUI/Closure to create one,
// then dynamically replace that <input> element.
}
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.