gpt4 book ai didi

javascript - 在 Jquerymobile 中获取 slider 的值?

转载 作者:行者123 更新时间:2023-11-30 08:52:20 26 4
gpt4 key购买 nike

我无法让它在 jquerymobile 中工作我在 weightvalue 变量上得到 null :

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" >

最佳答案

工作示例:http://jsfiddle.net/Gajotres/s33tX/

$(document).on('pagebeforeshow', '#index', function(){ 
alert($("#sliderWeight").val());
});

关于javascript - 在 Jquerymobile 中获取 slider 的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16774425/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com