【发布时间】:2017-06-13 07:45:35
【问题描述】:
我要做的就像代码一样:当值大于10时,显示>10,或者显示1-10。它工作正常。但是,如果我取消注释 jquery mobile ,它就不再起作用了。
<!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>
【问题讨论】:
-
您在控制台中看到任何特定错误?
-
试过了,对我有用吗?真正的问题是什么?
-
如果你取消注释第 7 行
标签: jquery jquery-mobile