/*控制年龄输入范围1-200*/
$.fn.regInput = function(){
	return $(this).each(function(){
		$(this).on('input',function(e){
			if($(this).val()==''){
				return
			}
			if($(this).val()<1||$(this).val()>200){
				$(this).val($(this).data('old_val')||'')
				return false
			}
			$(this).data('old_val',$(this).val())
		})
	})
}
$('#age').regInput();

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
相关资源
相似解决方案