检查字段是否存在无效字符 [英] Checking a field for invalid chars
问题描述
大家好
无论如何,在我提交表格之前,我可以查看
输入字段的内容,看它只包含字母和数字。
谢谢
罗比
Hi All
Is there anyway that before I submit a form I can check the contents of an
input field to see that it only contains letters and numbers.
Thanks
Robbie
推荐答案
写新闻:alt。 www.webmaster,comp.lang.javascript
从Posted by Supernews的安全性, http://www.supernews。 com
自助餐厅
Astra< #@Spam.com>说:
Writing in news:alt.www.webmaster,comp.lang.javascript
From the safety of the Posted via Supernews, http://www.supernews.com
cafeteria
Astra <No@Spam.com> said:
嗨所有
你好吗?
在我提交表格之前还有吗我可以检查
输入字段的内容,看它只包含字母和数字。
Hi All
How do you do?
Is there anyway that before I submit a form I can check the contents of
an
input field to see that it only contains letters and numbers.
yes - 通常的警告适用。
你想要的是一个正则表达式。
-
William Tasso
>
**照常营业
yes - usual caveats apply.
What you want is a regular expression.
--
William Tasso
** Business as usual
Astra写道:
无论如何,在我提交表格之前,我可以查看内容一个
输入字段,看它只包含字母和数字。
Is there anyway that before I submit a form I can check the contents of an
input field to see that it only contains letters and numbers.
为什么你开始关于这个主题的两个主题?我已回复了一个名为''阻止用户输入除字母以外的任何内容和
数字''的那一个
。
-
萨法拉(Stephen Morley)
http://www.safalra.com/programming/javascript/
Why did you start two threads on this subject? I''ve replied in the one
titled ''Stopping user from inputting anything other than letters and
numbers''.
--
Safalra (Stephen Morley)
http://www.safalra.com/programming/javascript/
Hi William
我只是找不到字母和数字的Reg Exp语法,例如AZ,
az和0-9。
Do你知道它是什么吗?
问候
罗比
威廉塔索 < SP ********* @ tbdata.com>在留言中写道
news:op ******************* @ tbdata.com ...
写在新闻:alt。 www.webmaster,comp.lang.javascript
从Posted by Supernews的安全性, http://www.supernews.com
自助餐厅
Astra< #@Spam.com>说:
Hi William
I just can''t find the Reg Exp syntax for just letters and numbers, eg A-Z,
a-z and 0-9.
Do you know what it is?
Regards
Robbie
"William Tasso" <Sp*********@tbdata.com> wrote in message
news:op*******************@tbdata.com...
Writing in news:alt.www.webmaster,comp.lang.javascript
From the safety of the Posted via Supernews, http://www.supernews.com
cafeteria
Astra <No@Spam.com> said:
嗨所有
你好吗?
在我提交表格之前还有吗我可以检查
输入字段的内容,看它只包含字母和数字。
Hi All
How do you do?
Is there anyway that before I submit a form I can check the contents of
an
input field to see that it only contains letters and numbers.
yes - 通常的警告适用。
你想要的是一个正则表达式。
-
William Tasso
>
**照常营业
yes - usual caveats apply.
What you want is a regular expression.
--
William Tasso
** Business as usual
这篇关于检查字段是否存在无效字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!