Future 3 gadi atpakaļ
vecāks
revīzija
759ca112e2
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      src/main/webapp/ShoppingCart.html

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

@@ -97,6 +97,16 @@
             }
         });
         $("form>div#Store>div.goods>div#exp>div#count>input").focusout(function()
+        {
+            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;