181
rated 0 times
[
184]
[
3]
/ answers: 1 / hits: 99023
/ 11 Years ago, sat, july 27, 2013, 12:00:00
I have an input type=text
for names in my HTML code. I need to make sure that it is a string with letters from 'a' to 'z' and 'A' to 'Z' only, along with space(s).
This is my HTML code:
<form action= name=f onsubmit=return f1()>
Name : <input type=text name=name>
I'm expecting my JavaScript to be something like this:
function f1()
{
var x=document.f.name.value;
.....
.....
return false;
}
PS: I'm not really familiar with Regular Expressions, so please do put up an explanation with the code.
More From » html