0
我已经创建了一个名为signed by的标签和文本框。只允许在母版页中使用jQuery文本
这里是我的asp.net代码:
<label>Signed By</label>
<div>
<asp:TextBox ID="txtSigned" class="form-control" runat="server"></asp:TextBox></div>
这里是我的jQuery代码:
$("#txtSigned").keypress(function(event){
var inputValue = event.which;
if(!(inputValue >= 65 && inputValue <= 120) && (inputValue != 32 && inputValue != 0)) {
event.preventDefault();
}
});
所以,用户只能在该文本框中输入文本和数字不应该被允许。
感谢您的回复,但urbz我想通过jQuery和母版页来实现它,那么这有可能吗? – Sridhar
查看更新回答@Sridhar – urbz
感谢urbz及其工作正常。 – Sridhar