私がしようとしているのは、コードのようなものです。値が10より大きい場合、表示が10より大きい場合、または1から10を表示する場合は正常です。ただし、jqueryモバイルのコメントを外すと、もう動作しません。jQuery Mobile:範囲の変更イベントを取得する方法Slider?
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<!--<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>-->
</head>
<body>
<form>
<label for='range'>as</label>
<input id='range' type='range' onmousemove='test()'>
<p id='display'>display</p>
</form>
<script>
function test(){
var v = $('#range').val();
if(v <= 10)$("#display").text('1-10');
else $("#display").text('>10');
}
</script>
</body>
</html>
あなたが見ているコンソール内の任意の特定のエラー:以下は、JQMスライダーをテストすることができ、簡単なスタブがありますか? –
それを試して、私のためにうまくいく?実際には何が問題なのですか? –
#7 .itの行のコメントを外した場合は、それ以上は機能しません – user7873949