0
我想在表單提交後使用$ _POST獲取設置的範圍值。問題是當範圍設置爲10 - 25時,值10是唯一的值。Jquery:範圍滑塊:如何獲取設置的範圍值?
if(isset($_POST['btn_submit']))
{
$value = $_POST['get'];
echo "<script> alert($value) </script>";
}
<form method="post">
<input class="range-slider" type="hidden" name="get"/>
<input type="submit" value="Submit" name="btn_submit">
</form>
$(document).ready(function(){
$('.single-slider').jRange({
from: -2.0,
to: 2.0,
step: 0.5,
scale: [-2.0,-1.0,0.0,1.0,2.0],
format: '%s',
width: 300,
showLabels: true,
snap: true
});
$('.range-slider').jRange({
from: 0,
to: 100,
step: 1,
scale: [0,25,50,75,100],
format: '%s',
width: 300,
showLabels: true,
isRange : true
});
});
是的,我isRange設置爲true我下一步該怎麼辦? –