如何检查jQuery中进度条的值? 比方说,我按下一个按钮,它关系到50%,如果我把25%的按钮,我想获得它说控制jQuery酒吧的值
<!DOCTYPE HTML>
<html>
<head>
<link rel="shortcut icon" href="../test/pics/bbti.png" />
<title>Bing Bang Theory</title>
<link rel="stylesheet" type="text/css" href="../test/css/style2.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
</head>
<body>
<h1>bbt</h1>
<!--progress bar start-->
<div id="progressbar"></div>
<br />
<button onclick="set25()">Set to 25%</button>
<button onclick="set50()">Set to 50%</button>
<button onclick="set75()">Set to 75%</button>
<button onclick="set100()">Set to 100%</button>
<script>
$(function() {
$("#progressbar").progressbar({
value: 0
});
});
// Set progressbar to 25%
function set25() {
//somewhere here is the code about if statement.
$("#progressbar").progressbar("option", "value", 25);
}
// Set progressbar to 50%
function set50() {
$("#progressbar").progressbar("option", "value", 50);
}
// Set progressbar to 75%
function set75() {
$("#progressbar").progressbar("option", "value", 75);
}
// Set progressbar to 100%
function set100() {
$("#progressbar").progressbar("option", "value", 100);
}
</script>
<!--progress bar stops-->
</body>
</html>
你能帮助“你不能低于50%进入”警报我解决它? 谢谢。