日期:2014-05-17 浏览次数:20549 次
<input id="bid" value="5000">
<input id="reserve_price" value="750.00">
<script>
$$=function(id){
return document.getElementById(id);
}
var error='';
if($$("bid").value.replace(/^\s+/,"").replace(/\s+$/,"")<$$("reserve_price").value){
error+="Your bid must be equal to or higher than the reserve price\n";
}
alert($$("bid").value.replace(/^\s+/,"").replace(/\s+$/,""));
alert($$("reserve_price").value);
alert(error);
</script>