如何使 html5 滑块(输入类型='范围')在 Firefox 中工作 [英] How do I make html5 slider (input type='range') work in Firefox

查看:31
本文介绍了如何使 html5 滑块(输入类型='范围')在 Firefox 中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用html5元素,即

I try to use html5 element, which is

<input type='range' step='1' min='-300' max='-1' />

它应该是一个滑块.它适用于 Chrome.但它在 Firefox8 中不起作用.我在html5test.com"中检查过,它说 Firefox 8 部分支持范围"类型.它支持min"和max"属性,但不支持step"属性.然后我删除step"属性,比如

It is supposed to be a slider. It works in Chrome. But it does not work in Firefox8. I checked that in "html5test.com", it says firefox 8 partially supports the "range" type. It supports "min" and "max" attribute, but not "step" attribute. Then I erase the "step" attribute, like

<input type='range' min='-300' max='-1' />

为什么还是不行?

有什么办法让它工作吗?

Is any way to let it work?

推荐答案

这是 不支持 在版本 23 之前的 Firefox 中.有关版本 4 及更高版本中的 Javascript 实现,请参阅 http://frankyan.com/labs/html5slider/ .

This is not supported in Firefox before version 23. For a Javascript implementation in versions 4 and up, please see http://frankyan.com/labs/html5slider/ .

根据 Jonathan Watt 对上述错误报告的评论,支持已添加到 Firefox 开发分支并随版本 23 一起发布.

According to Jonathan Watt's comment on the bug report linked above, support has been added to the Firefox development branch and was released with version 23.

这篇关于如何使 html5 滑块(输入类型='范围')在 Firefox 中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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