Ok basically when I type , it won't allow it. I want to add more like < > / \ etc how do I do it?
$("#in1").keypress(function (evt) {
if (String.fromCharCode(evt.which) == ",")
return false;
});
<input type="text" id="in1">
Can see the demo here. http://jsfiddle.net/QshDd/38/
its working , you Required to give more conditions:
Another Solution , either use regEx or use XMLParser or JSON parser methods.
If you have a list of disallowed characters, you can forbid them in this fashion:
Try this, if you need only alphabets
if you want something like this
<input type="text">
===>input typetext
http://jsfiddle.net/QshDd/61/