0
我想排除Android上的「輸入」(鍵碼13)鍵,當用戶選擇一個數量,但我仍然需要他仍然能夠刪除數量(鍵碼8)。排除鍵碼(android)
<input type="number" name="quantity" value="<?php echo $this->request-
>quantity; ?>" size="3" onkeypress="return event.charCode <= 57"
maxlength="3"/>
我試圖用「& & event.charCode!= 13」或與==操作符單獨選擇每一個數字,但它不工作,我應該創造條件或者我可以使用JavaScript來攔截charCode 13何時使用?