<input type="text" name="txt" οnkeydοwn="event.returnValue=false;" οnpaste="return false" />
服务器控件:
<asp:TextBox ID="txt" runat="server" οnkeydοwn="event.returnValue=false;" οnpaste="return false"></asp:TextBox>
用FileUpload经常要禁止手动输入:
<asp:FileUpload ID="fu" runat="server" οnkeydοwn="event.returnValue=false;" οnpaste="return false" />