In comp.lang.javascript message <4831B10F.4080201 (AT) PointedEars (DOT) de>, Mon,
19 May 2008 18:55:43, Thomas 'PointedEars' Lahn <PointedEars (AT) web (DOT) de>
posted:
Quote:
jothi.v81 (AT) gmail (DOT) com wrote:
i want to validate the textbox that it can accept numers only.and
alphabets only.
if (/\W/.test(es["foo"].value)) |
That will, contrary to specification, accept the underline character.
Please think before you write.
It will also reject alphabetic characters such as á é í ó ú ij and those
with umlauts; and all Russian Greek, Hangul, etc., letters. But
probably the OP had not intended that they be allowed.
--
(c) John Stockton, nr London UK. ???@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.