html--username-passwd

 

function isValidPassword(s)
    {
        var tmpString = s;
        var flag = 0;
        var character = "";
        var validString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.@";
 
        if(tmpString.length == 0)
        {
            window.location.href = "ComInfoDisplay.jsp?ERROR_TYPE=2"+"&ERROR_ID=07";
            return false;
        }
        else
        {      
            for (var i = 0; i < tmpString.length; i++)
            {
                character=tmpString.substring(i,i+1);
                if(validString.indexOf(character) == -1)
                {
                    flag++;
                }
            }
            if (flag!=0)
            {
                window.location.href = "ComInfoDisplay.jsp?ERROR_TYPE=2"+"&ERROR_ID=06";
                return false;
            }
            else
            {
                return true;
            }
        }
 
    }
    //add by fengyanan60019624 AB4D02824 2007-01-11 begin
    //妫€鏌ョ敤鎴穒d杈撳叆鏄惁鏈夋晥
    function isValidUser(s)
    {
        var tmpString = s;
        var flag = 0;
        var character = "";
        //var validString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.@_-";
        // modify by z00187860 for US.IPTVV1R3C56Laua01.21.001.MEM.001 begin
        //娑夊強鍒扮敤鎴峰笎鍙稶serID鐨勬牎楠屽彧闄愬埗% ' | # & 绌烘牸 $ "\ + `杩?1涓瓧绗︼紝鑰屼笉鍋氬叾浠栭檺鍒?
  var validString = /^[%|#&\s'$`+\\"]*$/;
        if(tmpString.length == 0)
        {
            window.location.href = "ComInfoDisplay.jsp?ERROR_TYPE=2"+"&ERROR_ID=07";
            return false;
        }
        else
        {      
            if(!validString.test(tmpString))
            {
                return true;
            }
            else
            {
             window.location.href = "ComInfoDisplay.jsp?ERROR_TYPE=2"+"&ERROR_ID=10";
    return false;
            }
        }
      // modify by z00187860 for US.IPTVV1R3C56Laua01.21.001.MEM.001 end
    }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值