//判断是否是数字1 if ((e.KeyChar < || e.KeyChar > ) && (e.KeyChar != ) && (e.KeyChar != ) && (e.KeyChar != )) { e.Handled = true; }