我正在尝试在http://www.andyloos.co.uk/calculator/上复制计算器。是否有可能看到他们是如何进行计算的?看看他们的Java-Script?
我已经到了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" ) );
});