我无法让它在 jquerymobile 中工作我在 weightvalue 变量上得到空值:
JS
$("#submitWeight").on('click', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
submitWeight(e);
});
function submitWeight(e){
var weightMonth = $("#selectMonth option:selected").text();
var weightValue = $("#sliderWeight").slider( "option", "value");
alert("Done");
}
HTML
<input type="range" name="slider" id="sliderWeight" value="60" min="0" max="100" data-theme="c" >