Rumah > Artikel > pembangunan bahagian belakang > 看看还有哪位高手会犯这两个异常?
看看还有谁会犯这两个错误????
第一个JS问题
<input id="bid" value="5000"><br /> <input id="reserve_price" value="750.00"><br /> <script><br /> $$=function(id){<br /> return document.getElementById(id);<br /> }<br /> var error='';<br /> if($$("bid").value.replace(/^\s+/,"").replace(/\s+$/,"")<$$("reserve_price").value){<br /> error+="Your bid must be equal to or higher than the reserve price\n";<br /> }<br /> alert($$("bid").value.replace(/^\s+/,"").replace(/\s+$/,""));<br /> alert($$("reserve_price").value);<br /> alert(error);<br /> </script>