Drag a handle to select a numeric value.
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function() {
$( "#slider-range-max" ).slider({
range: "max",
min: 1,
max: 100,
value: 1,
slide: function( event, ui ) {
$( "#amount" ).val( ui.value );
}
});
$( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) );
});
</script>
</head>
<body>
<p>
<form name="qnty" action="" method="post">
<label for="amount">Quantity:</label>
<input type="text" id="amount" readonly style="border: 0; color: #38761d; font-weight: bold;" name="qnty"/>
</p>
<div id="slider-range-max" style="cursor:pointer"></div>
<br>
<input type="submit" value="submit">
</body>
</form>
</html>




No comments:
Post a Comment