熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

Javascript實現論壇中常見的密碼強度提示[1]

2022-06-13   來源: JSP教程 
<%@ Page Language=C# AutoEventWireup=true CodeBehind=Defaultaspxcs Inherits=PasswordStrong_Default %>
  <!DOCTYPE html PUBLIC //WC//DTD XHTML Transitional//EN http://wwwworg/TR/xhtml/DTD/xhtmltransitionaldtd>
  <html xmlns=http://wwwworg//xhtml >
  <head runat=server>
  <title></title>
  </head>
  <body>
  <form id=form runat=server>
  <div>
  <input  id=reg_passwd__ name=reg_passwd__ value= ;= onkeyup=update_strength(reg_passwd__reg_passwd__strength_display__) autocomplete=off type=password/>
  <script type=text/javascript>
  function update_strength(input_field_id output_display_id)
  {
   var input_field = documentgetElementById(input_field_id);
   var output_display = documentgetElementById(output_display_id);
   var input_str = input_fieldvalue;
   var input_length = input_strlength;
   var strength = ;
   // increase strength if contains []
   number_re = new RegExp([]);
   if (number_retest(input_str)) {
    strength++;
   }

[]  []  


From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20664.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.