| Re: HTML Validation Hello Ganesh
Pls find the example given below, this doesnot accept the character < , > and / ,usually in the HTML we will be using these characters for tags,
Even if the user wants to type those character , he cannot enter these three characters. If you want , the text box not to accept more special character then write down a logical condition which specifies a range
Use this code given below, it works for you < INPUT type="text" name="someText" size="10" maxlength="10" validate="true" onkeypress="if (event.keyCode == 60 || event.keyCode == 62 || event.keyCode == 47) event.returnValue = false;" >
Im not sure whether that should be == or =
Let me know your questions
Thank You |