See simple test programs below. In the warning, I have to display variable maxpresis with two decimals. I have replaced the $ Maxprice in the testing program, but in reality, $ MaxPrice is read from a SQL file and it is a numeric field with numeric value (in this case 2.00). The warning is just displaying "2" how can I show it "2.00"?
& lt; Html & gt; & Lt; Top & gt; & Lt; Script language = "javascript" & gt; Function myFunction () {PriceEntered = document.forms ["form1"] ["value"]. Values; MaxPrice = document.forms ["Form1"] ["MaxPrice"] Price. Warning ("value entered" = "+ +" + max + "+ max +"); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt ;? Php $ MaxPrice = 2.00; ? & Gt; & Lt; Body & gt; & Lt; Form id = "form1" name = "form1" method = "post" onsubmit = "myfunction ()" action = "test.php" & gt; & Lt; Input name = "maxprice" id = "maxprice" type = "hidden" value = "& lt ;? php echo $ maxpris;; & gt;" & Gt; & Lt; Input name = "value" id = "value" type = "text" value = "3.00" & gt; & Lt; Input type = "submit" name = "submit1" value "submit" /> & Lt; / Form & gt; & Lt; / Body & gt;
use warning (enter value " = "+ Number (value divided). Tofix (2) +" and max = "+ number (maxpiece) .tiffs (2)); .
No comments:
Post a Comment