这个js怎么没不能验证呢?纠结<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>后台管理</title>
<link href="/css/manage/admincp.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript"> 
/* 验证表单输入项 */
function testNumber()
{
if(!this.isNull()){
   for(i=0;i<this.length;i++)
   {
    if(this.charAt(i)<"0"||this.charAt(i)>"9")
    {
     return false;
    }
   }
   return true;
}
else
{
   return true;
}
}
</script>
</head>
<body >
<table width="100%" border="0" cellspacing="1" cellpadding="3" class="tablewidth" align="center">
  <tr>
    <td class="head">&nbsp; </td>
  </tr>
</table><div align="center"> <!--
-->
<table width="100%" border="0" cellspacing="1" cellpadding="3" class="tablewidth">
  <form action="/biaoq/updateBiaoqAction.action" method="post" onSubmit="return testNumber()"> 
    <tr class="head" align="center"> 
       <tr class="header"><td colspan="2">
        <input type="button" name="Submit22x" value="更换选择显示其他设置" onClick="window.location=('/biaoq/toInsertBiaoqAction.action')">
    
        <input type="button" name="Submit222" value="查看效果" onClick="window.open('http://localhost')">
        <input type="button" name="Submit2222" value="返回频道/专题" onClick="window.location=('http://localhost/')"></td></tr>
      </td>
    </tr>
<!---->
    <tr> 
      <td bgcolor="#FFFFFF" width="18%">类型:</td>
      <td bgcolor="#FFFFFF" width="82%"> 
        <input type="radio" name="biaoq.logintype" value="0" onclick="code('0');" >
        横条登录框 
        <input type="radio" name="biaoq.logintype" value="1" onclick="code('1');" >
        方形登录框</td>
    </tr>
<!---->
    <tr> 
      <td bgcolor="#FFFFFF" width="18%">调用代码:</td>
      <td bgcolor="#FFFFFF" width="82%">
        <textarea name="code" cols="80" rows="5" id="jscode"><script language="JavaScript" src="http://localhost/do/hack.php?hack=login&job=js&styletype=0"></script></textarea>
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">更新内容时上方遮蔽层设置: </td>
      <input type="hidden" name="biaoq.id" value="${biaoq.id }" />
      <td bgcolor="#FFFFFF">层宽 
       
        <input name="biaoq.wide" type="text" id="wide" value="${biaoq.wide}" size="4" />
        层高 
        <input name="biaoq.high" type="text" id="high" value="${biaoq.high}" size="4" />
        层的颜色 
        <input name="biaoq.color" type="text" id="color" value="${biaoq.color}" size="12"  onclick="foreColor_font(this);" />
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">是否隐藏,暂时不显示:</td>
      <td bgcolor="#FFFFFF"> 
        <input type="radio" name="biaoq.hide" value="0"  checked>
        显示 
        <input type="radio" name="biaoq.hide" value="1"  />
        隐藏</td>
    </tr>
    <tr> 
      <td align="center" bgcolor="#FFFFFF" colspan="2"><label> 
        <input type="submit" name="Submit" value="提 交" onClick=sub() />
        </label>  
      </td>
    </tr>
  </form>
</table> <!---->
</div>
<br>
</body>
</html>