HTML maxlength attribute not working on chrome and safari?

前端 未结 7 1731
借酒劲吻你
借酒劲吻你 2020-12-15 15:06


        
7条回答
  •  半阙折子戏
    2020-12-15 15:47

    For those who still can't get it to work... Try this to fire up the fatter number pads:

    
    

    And the js:

    $('input[name="no1"]').keypress(function() {
        if (this.value.length >= 1) {
            return false;
        }
    });
    

提交回复
热议问题