Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML5输入类型=编号Polyfill不在IE10中工作_Html_Internet Explorer 10_Polyfills - Fatal编程技术网

HTML5输入类型=编号Polyfill不在IE10中工作

HTML5输入类型=编号Polyfill不在IE10中工作,html,internet-explorer-10,polyfills,Html,Internet Explorer 10,Polyfills,我已尝试使用此pollyfill: 但它在IE10中没有任何作用。也没有脚本错误。除了包含JS和CSS文件之外,还有什么其他内容吗 我将进一步指出,polyfill的官方演示在Windows 8的IE10中甚至不起作用:问题从一开始就很明显: i = document.createElement("input"); i.setAttribute("type", "number"); if (i.type === "text") Internet Explorer 10中i.type的结果是“数

我已尝试使用此pollyfill:

但它在IE10中没有任何作用。也没有脚本错误。除了包含JS和CSS文件之外,还有什么其他内容吗


我将进一步指出,polyfill的官方演示在Windows 8的IE10中甚至不起作用:

问题从一开始就很明显:

i = document.createElement("input");
i.setAttribute("type", "number");
if (i.type === "text")
Internet Explorer 10中
i.type
的结果是“数字”,这意味着Internet Explorer 10实际上支持数字输入类型-这一点由进一步确认。您甚至可以通过尝试将字母输入到数字输入中来确认功能是否到位-当元素失去焦点时,这些字母将被删除


如果您希望此工具逐步增强Internet Explorer中此控件的界面,则需要将条件解析为true。

我猜polyfill有错误-看到您说的IE 10支持数字输入类型了吗?为什么不显示pinner按钮?@brushleaf微调器是一些浏览器添加到控件的增强功能,但它们不是控件本身所需的UI。数字控件是由其行为定义的,而不是由其表示形式定义的。好的,应该更改条件。但对IE来说什么是好的呢?