Future 3 lat temu
rodzic
commit
759ca112e2
1 zmienionych plików z 10 dodań i 0 usunięć
  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()
         {