基于Window消息实现 class TextBoxExt:TextBox { private const int WM_RBUTTONDOWN = 0x0204; private const int WM_CHAR = 0x0102; protected override void WndProc(ref Message m) { switch (m.Msg) { case WM_RBUTTONDOWN: return;//屏蔽默认右键菜单 break; case WM_CHAR: int n
$("input[name='fangwenyudinhuishu']").keyup(function(){ var tmptxt=$(this).val(); $(this).val(tmptxt.replace(/\D|^0/g,'')); }).bind("paste",function(){ var tmptxt=$(this).val(); $(this).val(tmptxt.replace(/\D|^0/g,'')); }).css("im