Future %!s(int64=3) %!d(string=hai) anos
pai
achega
759ca112e2
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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()
         {