Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/435.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/2/jquery/71.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 在Jquerymobile中获取滑块的值?_Javascript_Jquery_Jquery Mobile_Jquery Mobile Slider - Fatal编程技术网

Javascript 在Jquerymobile中获取滑块的值?

Javascript 在Jquerymobile中获取滑块的值?,javascript,jquery,jquery-mobile,jquery-mobile-slider,Javascript,Jquery,Jquery Mobile,Jquery Mobile Slider,我无法在jquerymobile中使用此功能。我在weightvalue变量上得到null: JS HTML <input type="range" name="slider" id="sliderWeight" value="60" min="0" max="100" data-theme="c" > 工作示例: 工作示例: 我以为我以前试过这个,但我又试了一次,它成功了。谢谢你,虽然我以前试过,但我又试了一次,效果很好。谢谢 <input type="range" nam

我无法在jquerymobile中使用此功能。我在weightvalue变量上得到null:

JS

HTML

<input type="range" name="slider" id="sliderWeight" value="60" min="0" max="100" data-theme="c" >
工作示例:

工作示例:


我以为我以前试过这个,但我又试了一次,它成功了。谢谢你,虽然我以前试过,但我又试了一次,效果很好。谢谢
<input type="range" name="slider" id="sliderWeight" value="60" min="0" max="100" data-theme="c" >
$(document).on('pagebeforeshow', '#index', function(){ 
    alert($("#sliderWeight").val());
});