Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/369.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.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
Javascript 如何使范围滑块触摸屏友好?_Javascript_Html_Css - Fatal编程技术网

Javascript 如何使范围滑块触摸屏友好?

Javascript 如何使范围滑块触摸屏友好?,javascript,html,css,Javascript,Html,Css,我正在建立一个小项目,我需要改变一个范围滑块元素的动画持续时间。它在桌面上工作,但在移动屏幕上不工作 let range1=document.getElementById(“范围”); let line=document.getElementById(“雷达线”); 函数setSpeed(){ line.style.animationDuration=range1.value+'s'; } 范围1.addEventListener(“mousemove”,设置速度) 不要使用mousemov

我正在建立一个小项目,我需要改变一个范围滑块元素的动画持续时间。它在桌面上工作,但在移动屏幕上不工作

let range1=document.getElementById(“范围”);
let line=document.getElementById(“雷达线”);
函数setSpeed(){
line.style.animationDuration=range1.value+'s';
}
范围1.addEventListener(“mousemove”,设置速度)


不要使用
mousemove
,而是尝试
touchmove
尝试检测您是否在设备上。也许我应该分别为touchmove添加另一个事件侦听器?