Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 验证表达式在InternetExplorer6中不工作,而在IE 8和9中工作正常_Javascript_Asp.net - Fatal编程技术网

Javascript 验证表达式在InternetExplorer6中不工作,而在IE 8和9中工作正常

Javascript 验证表达式在InternetExplorer6中不工作,而在IE 8和9中工作正常,javascript,asp.net,Javascript,Asp.net,我有一个更改密码页面,在这个页面上我有一个正则表达式验证器,如下所示 <asp:RegularExpressionValidator ID="StrongPasswordValidator" runat="server" ControlToValidate="txtNewPassword" Display="Dynamic" ErrorMessage="New password must be from 8 to 50 chara

我有一个更改密码页面,在这个页面上我有一个正则表达式验证器,如下所示

  <asp:RegularExpressionValidator ID="StrongPasswordValidator" runat="server" ControlToValidate="txtNewPassword"
                            Display="Dynamic" ErrorMessage="New password must be from 8 to 50 characters long.It must contain atleast one digit and one uppercase.It cannot contain spaces &amp; letters like /\'?&gt;,&quot;|"
                            meta:resourcekey="StrongPasswordValidatorResource1" SetFocusOnError="True" ValidationExpression="^(?=.*\d)(?=.*[A-Z])(?!.*[\s\\'?>/,&quot;|]).{8,50}$"
                            ValidationGroup="ChangePassword"></asp:RegularExpressionValidator>

验证表达式在I.E.8和9中工作正常,但在I.E.6中不工作,有人能帮我一下吗?

事实上I.E.6中存在长度问题,它没有识别长度,因此为了解决这个问题,我使用JavaScript自定义验证器,并使用String.length属性来解决长度问题,因此现在它在I.E.6中也能很好地工作

放弃IE 6。请微软已经做到了,你也应该这么做。它不是关于我的,关于用户的任何线索…@ BaseHaeld-你选择使用微软技术来开发你的应用程序,并考虑他们不再认为IE6是可行的解决方案。我想说你的运气不好。你可以使用Javascript验证函数代替常规的ExpressionValidator。对你来说,它可以毫无问题地运行所有浏览器。@BASEERHAIDER-将你的时间花在比让这件事为你的一小部分用户使用的浏览器工作更高效的事情上