这是代码
<script>
$( ".slider" ).slider({
animate: true,
range: "min",
value: 0,
min: 0,
max: 4,
step: 1,
//this gets a live reading of the value and prints it on the page
slide: function( event, ui ) {
if(ui.value ==0)
$( "#slider-result" ).html( "Poor");
else if(ui.value == 1)
$( "#slider-result" ).html( "Average");
else if(ui.value == 2)
$( "#slider-result" ).html( "Good");
else if(ui.value == 3)
$( "#slider-result" ).html( " Very Good");
else if(ui.value == 4)
$( "#slider-result" ).html( "Excellent");
},
//this updates the hidden form field so we can submit the data using a form
change: function(event, ui) {
$('#hidden').attr('value', ui.value);
}
});
</script>
此滑块创建一个 jquery 滑块并显示“非常好好差”等等。在选择 . 现在我需要选择滑块的值怎么做???