以下 CSS 在我的 Windows 手机上运行良好,但我的 Pre 不能默认为数字输入。input.numeric { -wap-input-format:"*n"; } 我怎样让Pre(以及其他较新的移动浏览器)默认使用数字输入?
猜测一下,HTML5中引入的type属性的新number值确实在移动版Safari上有效: <input type="number" min="0" max="10" step="2" value="6" /> 参考链接: http://diveintohtml5.ep.io/forms.html#type-number