Future 3 年之前
父節點
當前提交
759ca112e2
共有 1 個文件被更改,包括 10 次插入0 次删除
  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;