You may try to use this function:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript">
function blockSpecialChar(e){
var k;
document.all ? k = e.keyCode : k = e.which;
return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 32 || (k >= 48 && k <= 57));
}
</script>
</head>
<body>
<form id="frm" runat="server">
<input type="text" name="folderName" onkeypress="return blockSpecialChar(event)"/>
</form>
</body>
</html>
Comments
Post a Comment