Future 3 vuotta sitten
vanhempi
commit
759ca112e2
1 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 10 0
      src/main/webapp/ShoppingCart.html

+ 10 - 0
src/main/webapp/ShoppingCart.html

@@ -101,6 +101,16 @@
             let num = Number.parseInt(this.value);
             if(num.toString() == "NaN") num = 0;
             this.value = num;
+        }).keyup(function()
+        {
+            let num = Number.parseInt(this.value);
+            if(num.toString() == "NaN") num = 0;
+            this.value = num;
+        }).keydown(function()
+        {
+            let num = Number.parseInt(this.value);
+            if(num.toString() == "NaN") num = 0;
+            this.value = num;
         });
         $("form>input[type='submit']").click(function()
         {