javascript验证错误消息 [英] javascript validation error message
本文介绍了javascript验证错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在添加javascript表单验证后不断收到此错误消息。如果有人进入下面表单的页面,他们会收到调试邀请
我尝试将其添加到onSubmit和Onclick但问题相同。有小费吗?在此先感谢
行:167
错误预期''}''
这是由于某种原因引起问题的行,
展开 | 选择 | 换行 | 行号
解决方案
您是否尝试将验证直接嵌入元素中?这使得在验证整个表单时更加容易。
http://www.thescripts.com/forum/post2532102-3.html
问题可能是你错过了分号line:
展开 | 选择 | Wrap | 行号
我快速扫描了你的代码,我想对于第一个if语句,你没有用大括号}来关闭。
RK
感谢您的回复。
你的意思是我应该像这样(下面)关闭第一部分,或者你的意思是在我上面发布的内容的最后?
至于密码,没有特别的理由限制为18我只是不想要人们输入很长密码的情况。没有其他原因。为什么这是不好的做法?
展开 | 选择 < span class =codeDivider> | Wrap | 行号
I keep getting this error message after adding javascript form validation. If anyone goes to the page with the form below, they get the invite to debug
I have tried adding it to the onSubmit and Onclick but same problem. Any tips? thanks in advance
Line: 167
Error Expected ''}''
this is the line causing the problem for some reason,
Expand|Select|Wrap|Line Numbers解决方案Have you tried embedding the validation directly into your elements? That makes it a lot easier when it comes time to validate the whole form.
http://www.thescripts.com/forum/post2532102-3.html
The problem may be that you''re missing a semicolon at this line:
Expand|Select|Wrap|Line Numbers
Hi,
I had a quick scan through your code and I think for the first if statement you have not closed off with a curly bracket "}".
R.K.
Thanks for replying.
Do you mean i should close the first part like this(below) or do you mean right at the end of what i posted above?
As for the password, there is no particular reason why i limited to 18 i just don''t want a situation where people type in very long passwords. No other reason. Why is it bad practice?
Expand|Select|Wrap|Line Numbers
这篇关于javascript验证错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆