function changediv2(){
content = document.getElementById("jingpaidiv");
var price = document.getElementById("price").value;
var jingpaiPrice = document.getElementById("jingpaiPrice").value;
if(jingpaiPrice>price){
content.style.display ='none';
return true;
}else{
alert("您填写的竞拍价格必须大于现在的竞拍价!请重新填写!谢谢");
return false;
}
} 为什么当 jingpaiPrice 的值大于1000的时候price 的值小于1000的时候总是alert呢!
content = document.getElementById("jingpaidiv");
var price = document.getElementById("price").value;
var jingpaiPrice = document.getElementById("jingpaiPrice").value;
if(jingpaiPrice>price){
content.style.display ='none';
return true;
}else{
alert("您填写的竞拍价格必须大于现在的竞拍价!请重新填写!谢谢");
return false;
}
} 为什么当 jingpaiPrice 的值大于1000的时候price 的值小于1000的时候总是alert呢!
content = document.getElementById("jingpaidiv");
var price = parseInt(document.getElementById("price").value);
var jingpaiPrice = parseInt(document.getElementById("jingpaiPrice").value);
if(jingpaiPrice>price){
content.style.display ='none';
return true;
}else{
alert("您填写的竞拍价格必须大于现在的竞拍价!请重新填写!谢谢");
return false;
}
}
//你这样试试