restrict a character to type in a text box

前端 未结 5 630
借酒劲吻你
借酒劲吻你 2020-12-10 06:23

how we can restrict a character to type in a text box.

5条回答
  •  离开以前
    2020-12-10 07:03

       function isNumberKey1(evt)
    {
           var charCode = (evt.which) ? evt.which : event.keyCode;
          if ( char!=8(charCode < 65 || charCode > 106))
             return false;
    
             return true;
    }
    

提交回复
热议问题