找回密码
 注册
【阿里云】2核2G云服务器新老同享 99元/年,续费同价,云服务器3年机/5年机限时抢购,低至 2.5折华为云精选云产品特惠糖果主机Jtti,新加坡服务器,美国服务器,香港服务器,海外云服务器
查看: 783|回复: 6

请大家看一下,为什么没有办法在姓名一栏输入汉字?

[复制链接]
发表于 2005 年 6 月 21 日 23:19:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
  这个是一个电影网站程序,申请页面代码如下:请大家帮忙看一下,需要怎么改?


<!--#include file="articleconn.asp"-->
<!--#include file="ip.asp"-->
<!--#include file="top2.asp"-->
<SCRIPT>
function formcheck()
{
  if (!fucCheckSTR(document.regform.userid.value))
  {
   alert("请输入用户名!\n注意:只能为英文和数字!");
      document.regform.userid.focus();
   return false;
  }

  if (document.regform.userid.value.length < 4)
  {
   alert("用户名至少4个字符!");
      document.regform.userid.focus();
   return false;
  }

  if (document.regform.password.value.length < 6)
  {
  alert("密码至少6位!");
  regform.password.focus();
  return false;
  }

  if (document.regform.password.value!= document.regform.password2.value)
  {
  alert("两次输入的密码不相同!");
  regform.password2.focus();
  return false;
  }

if (!fucCheckSTR(document.regform.name.value))
  {
  alert("真实姓名一栏汉字系统损坏,请输入英文或者数字!");
  regform.name.focus();
  return false;
  }
      var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@.";
      var checkStr = regform.myemail.value;
      var allValid = true;
      for (i = 0;  i < checkStr.length;  i++)
      {
             ch = checkStr.charAt(i);
             for (j = 0;  j < checkOK.length;  j++)
             if (ch == checkOK.charAt(j))
                    break;
             if (j == checkOK.length)
             {
                    allValid = false;
                    break;
             }
      }
      if (regform.myemail.value.length < 6)
      {
                    allValid = false;
      }
      if (!allValid)
      {
             alert("您输入的 \"电子邮件地址\" 无效!");
             regform.myemail.focus();
             return false;
      }
      address=regform.myemail.value;
   if(address.length>0)
      {
       i=address.indexOf("@");
       if(i==-1)
             {
                    window.alert("对不起!您输入的电子邮件地址是错误的!")
                    regform.myemail.focus();
                    return false
       }
      ii=address.indexOf(".")
       if(ii==-1)
             {
                    window.alert("对不起!您输入的电子邮件地址是错误的!")
                    regform.myemail.focus();
                    return false
       }
   }
      if (checktext(regform.myemail.value))
      {
             alert("请您输入有效的\"e_mail\"!");
             regform.myemail.select();
             regform.myemail.focus();
             return false;
      }
  if (document.regform.city.value.length <5)
  {
   alert("请认真填写密码提示问题!\n要求不能少于5个字");
      regform.city.focus();
   return false;
  }

   if (document.regform.adress.value.length <1)
  {
   alert("请填写密码提示问题答案!");
      regform.adress.focus();
   return false;
  }
  
  if (document.regform.phone.value.length <1)
  {
   alert("请填写你的QQ号码!");
      regform.phone.focus();
   return false;
  }
  
return true;
}

//检查字符串
function fucCheckSTR(NUM)
{
   var i,j,strTemp;
   strTemp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
   if ( NUM.length== 0)
       return 0
   for (i=0;i<NUM.length;i++)
   {
      j=strTemp.indexOf(NUM.charAt(i));
      if (j==-1)
      {
        return 0;
      }
   }
   return 1;
}

function checktext(text)
{
                    allValid = true;

             for (i = 0;  i < text.length;  i++)
             {
                    if (text.charAt(i) != " ")
                    {
                           allValid = false;
                           break;
                    }
             }

return allValid;
}
</SCRIPT>
<div align="center">
  <center>
  <table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#1B409B" width="778" id="AutoNumber12" cellpadding="0" height="613">
   <tr>
     <td width="100%" bgcolor="#1B409B" height="613">
     <div align="center">
       <center>
       <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="758" id="AutoNumber13" height="580" bgcolor="#4885FE" cellpadding="0">
         <tr>
           <td width="10" valign="top">
           <img border="0" src="images/register-left1.gif" width="19" height="19"></td>
           <td height="19">
            </td>
           <td width="10" valign="top" align="right">
           <img border="0" src="images/register-right1.gif" width="19" height="19"></td>
         </tr>
         <tr>
           <td width="10"> </td>
           <td width="728">
           <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber15" cellpadding="0">
             <tr>
               <td width="100%">
               <img border="0" src="images/register-top.jpg" width="723" height="87"></td>
             </tr>
             <tr>
               <td width="100%" background="images/register-bg.jpg" height="400">
               <div align="center">
                 <center>
                 <table align="center" border="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber16" height="216" cellspacing="1">
                   <tr>
               <td width="100%" colspan="3" height="16" style="font-size: 9pt; font-family: Arial; color: #ffffff">
               <p align="center"><font color="#1B409B">为了保证正确注册,请认真填写注册资料,带 </font><font size="2" color="#1B409B">*</font><font color="#1B409B"> 为必需填写的内容。</font><br><br></td>
                   </tr>
       <FORM name=regform onsubmit="if (!formcheck()) return false;"
       action=user/joinserver.asp method=post>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>用户名:</FONT><BR></TD>
               <TD width="60%"><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" maxLength=15 size=20
                 name=userid>  
                 <BR><font color="#000000">注册用户名不能超过12个字符 </TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>密码:</FONT><BR></TD>
               <TD width="60%"><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" type=password maxLength= size=15 name=password> <font color="#000000">请输入密码,区分大小写</TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>确认密码:</FONT><BR></TD>
               <TD width="60%"><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" type=password maxLength= size=15 name=password2> <font color="#000000">请再输一遍确认</TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>真实姓名:</FONT></STRONG></TD>
               <TD><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" maxLength=3 size=8 name=name> <font color="#000000"><font color="#000000">汉字系统损坏,请输入英文或者数字!</TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>E-mail:</FONT><BR></TD>
               <TD width="60%"><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" name=myemail>
                 <BR><font color="#000000">务必填写真实的邮箱,否则忘记密码时无法取回</TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>提示问题:</FONT></STRONG></TD>
               <TD><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" maxLength=20 size=26 name=city>
                 <BR><font color="#000000">取回密码时用,最好填写只有自己才知道的问题。</TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>问题答案:</FONT></STRONG></TD>
               <TD><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" maxLength=20 size=26 name=adress></TD></TR>
             <TR>
               <TD align=right width="25%"><FONT
                 color=#000000>问题 Q Q:</FONT><BR></TD>    
               <TD width="60%"><INPUT style="border: 1px solid #3655AA; font-size:9pt; color:#000000" maxLength=10 size=20 name=phone>
                 <BR><font color="#000000">请填上你的QQ,以便我们更好的为你服务。</TD></TR>
              <TR align=center>
          <TD align=right width="25%"><FONT
                 color=#000000></FONT><BR></TD>
         <TD align=left><input name="b1" type="image" src="images/register-tijiao.gif" class="button1" value="提交注册" width="81" height="20"></font>
      <a href="javascript:document.regstep1.reset()"><img border="0" src="images/register-chongxie.gif" width="81" height="20"></a>
       </TD></TR></form>
                 </table>
                 </center>
               </div>
               </td>
             </tr>
             <tr>
               <td width="100%">
               <img border="0" src="images/register-bottom.jpg" width="722" height="27"></td>
             </tr>
           </table>
           </td>
           <td width="10"> </td>
         </tr>
         <tr>
           <td width="10" valign="bottom">
           <img border="0" src="images/register-left2.gif" width="19" height="19"></td>
           <td width="728"> </td>
           <td width="10" valign="bottom" align="right">
           <img border="0" src="images/register-right2.gif" width="19" height="19"></td>
         </tr>
       </table>
       </center>
     </div>
     </td>
   </tr>
  </table>
  </center>
</div>
<NOSCRIPT><IFRAME SRC=*.html></IFRAME></NOSCRIPT>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="778" id="AutoNumber10">
<tbody>
<tr>
<td width="100%" background="images/index-bottom5.gif" height="85">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="70%" id="AutoNumber11">
<tr>
<td width="100%"><font color="#1B409B" class="fontshadow"><span class="L18">本站仅提供影视欣赏方面的信息和链接,由所有网友一起维护,相关连接内容版权归原网站所有,  
影片版权归相关影音公司所有,相关链接站点提供观看的影片仅供宽带网用户测试研究用途,如 侵犯到你的权利速通知我们,我们确认之后将立即清除。</span></font></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
  </TBODY>
</TABLE>

</body>

</html>
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
发表于 2005 年 6 月 21 日 23:31:24 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
//检查字符串
function fucCheckSTR(NUM)
{
  var i,j,strTemp;
  strTemp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";    //此处限制只能输入英文字母和数字
  if ( NUM.length== 0)
   return 0
  for (i=0;i<NUM.length;i++)
  {
   j=strTemp.indexOf(NUM.charAt(i));
   if (j==-1)
   {
     return 0;
   }
  }
  return 1;
}
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2005 年 6 月 22 日 09:33:50 | 显示全部楼层
xchange

,那要怎么改?
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2005 年 6 月 22 日 09:50:49 | 显示全部楼层
好,搞定了,谢谢!
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2005 年 6 月 22 日 12:14:05 | 显示全部楼层
去掉那段应该可以吧
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2005 年 6 月 22 日 17:53:05 | 显示全部楼层
function fucCheckSTR(NUM) {
   if ( NUM.length== 0) return 0;
   return 1;
}

这样可以的吧?
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2005 年 6 月 24 日 21:21:48 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
不会吧?
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2024 年 9 月 21 日 05:46 , Processed in 0.102707 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表