TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Subin Thomas
NA
4.9k
125.9k
javascript to avoid special characters ?
Jan 22 2020 3:11 PM
i want to write a javascript code to avoid special characters in the textbox but,
it should allow comma , round brackets and forward slash
below is the javascript code which i have used it avoid all the special characters
<script type=
"text/javascript"
>
// added by subin to block special characters
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>
Reply
Answers (
3
)
Asp.net Web Inputform not alligned in some browsers
System.Data.SqlClient.SqlException:Login failed for user