2015-10-15 25 views

回答

0
if (yourInput < 100 && yourInput >= 1) 

,如果你也想控制你能做到這一點的小數位數:

yourInput = yourInput.toFixed(2); 
+0

怎麼樣「99.9999」 –

+0

那麼,我編輯它。 –

+0

我在運行時需要它用戶只能在float中輸入值 – kumar

0

您可以撥打任何情況下,本功能。

function abc(){ 
     var textValue = document.getElementById("text").value; 
     if (textValue >= 100 || textValue < 1.00) { 
      alert("Please insertAmount between 99.99 and 1.00"); 
      document.getElementById("text").focus(); 
      return false; 
     } 
    }