我想在http://www.andyloos.co.uk/calculator/上复制计算器。是否有可能看到他们如何进行计算?要查看他们的Java脚本吗?
我已经达到了http://jsfiddle.net/jstyl_es/Sqsuu/,但我并不太了解Java-Script以便将其推向前进。有人可以帮忙吗?
<div id="slider1"></div>
<div id="slider2"></div>
<div id="option">
<input type="radio" name="timeselect" value="optionA" />
Less than 6 hours
<input type="radio" name="timeselect" value="optionB" />
More than 6 hours
</div>
<input class="submit" type="submit" name="submit" value="Estimate">
</div>
`$(function() {
$( "#slider1" ).slider({
value:0,
min: 0,
max: 100000,
step: 50,
slide: function( event, ui ) {
$( "#amount1" ).val( ui.value );
}
});
$( "#amount1" ).val($( "#slider1" ).slider( "value" ) );
});
$(function() {
$( "#slider2" ).slider({
value:0,
min: 0,
max: 100000,
step: 50,
slide: function( event, ui ) {
$( "#amount2" ).val( ui.value );
}
});
$( "#amount2" ).val($( "#slider2" ).slider( "value" ) );
});