js表单验证类

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" src=" http://www.on-cn.cn/Validate/common.js"></script>
<script language="javascript" src=" http://www.on-cn.cn/Validate/Validate.js"></script>
<title>发货申请单</title>
</head>
<style type="text/css">
td,div{
 font-size:12px;
}
.SelectDiv a{
 display:block;
 margin-bottom:10px;
}
.SelectDiv a:hover{
 background-color:#FF0000;
}
.SelectDiv .Selected{
 background-color:#CCCC00;
}
.mySelectDiv{
 border:#FFCC00 2px dashed;
 background-color:#FFFF66;
 padding:2px 2px;
}
.mySelectDiv a{
 display:block;
 margin-bottom:10px;
}
.mySelectDiv a:hover{
 background-color:#FF0000;
}
.mySelectDiv .Selected{
 background-color:#CCCC00;
}
.focus{
 background-color:#FF9900;
}
.wrongClass{
 background-color:#FF0000;
}
.rightClass{
 background-color:#FFFF00;
}
#orderTable input{
 width:95%;
 height:20px;
 line-height:20px;
 text-align:center;
 border:none;
 border-width:0px;
}
#orderTable .InputEvent{
 border:#FF0000 1px solid;
 background-color:#FFD7EB;
 height:18px;
 line-height:18px;
}
.table{
 background-color:#7FC41C;
 text-align:center;
}
.trOne{
  background-color:#E6F8CB;
}
.trTwo{
 background-color:#DCF4B7;
}
.trEvent{
 background-color:#F5FCEB;
}
</style>
<table width="98%"  border="0" cellpadding="5" cellspacing="1" class="table">
  <form action="order.asp" method="post" id="orderForm">
    <tr class="title">
      <td colspan="4" align="center" class="trTitle">发货申请单</td>
    </tr>
   
    <tr>
      <td align="right" class="trTwo">密码:</td>
      <td  align="left" class="trOne" colspan="3"><input name="password" Caption="密码" type="password" IsMustFill="true" id="password" size="50"  /></td>
    </tr>
    <tr>
      <td align="right" class="trTwo">确认密码:</td>
      <td  align="left" class="trOne" colspan="3"><input name="password2" type="password" id="clientName" size="50" Rule="blur,this.value==$('password').value,3" Warn="密码输入不一致"  /></td>
    </tr>
    <tr>
      <td align="right" class="trTwo">代理商姓名:</td>
      <td  align="left" class="trOne" colspan="3"><input name="clientName" SelectList="上海同仁堂,上海雷允上,上海老百姓" type="text" id="clientName" size="50"  /></td>
    </tr>
    <tr>
      <td align="right" class="trTwo">代理商手机:</td>
      <td  align="left" class="trOne" colspan="3"><input name="clientPhone" IsMustFill="true" DataType="mobile" type="text" id="clientPhone" size="50" maxlength="11" Caption="代理商手机"/>      </td>
    </tr>
    <tr>
      <td align="right" class="trTwo">地区拼音:</td>
      <td  align="left" class="trOne" colspan="3"><input id="areaPy" readonly="readonly" type="text" size="50" /></td>
    </tr>
    <tr>
      <td align="right" class="trTwo">地区:</td>
      <td  align="left" class="trOne" colspan="3"><input name="area" SelectList="北京|beijing,上海|shanghai,广州|guangzhou" SelectDivClass="mySelectDiv"  readonly="readonly" type="text" id="area" size="50" SelectEvent="this.value,$('areaPy').value" />
      </td>
    </tr>
    <tr>
      <td colspan="4" align="center" valign="top" class="trTwo"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#006600" id="orderTable">
          <tr>
            <td height="25" align="center" bgcolor="#FFFFFF"><strong>品名</strong></td>
            <td width="16%" align="center" bgcolor="#FFFFFF"><strong>规格</strong></td>
            <td width="16%" align="center" bgcolor="#FFFFFF"><strong>计量单位</strong></td>
            <td width="16%" align="center" bgcolor="#FFFFFF"><strong>单价</strong></td>
            <td width="16%" align="center" bgcolor="#FFFFFF"><strong>发货数量</strong></td>
            <td width="14%" align="center" bgcolor="#FFFFFF"><strong>合计金额</strong></td>
            <td width="8%" align="center" bgcolor="#FFFFFF"><strong>类型</strong></td>
          </tr>
          <tr>
            <td height="25" align="center" bgcolor="#FFFFFF"><input type="text"  Caption="品名" IsMustFill="true" name="resName" SelectList="骨科玻璃酸钠,眼科玻璃酸钠" readonly  /></td>
            <td align="center" bgcolor="#FFFFFF"><input type="text" name="spec" value="2.5ml"  readonly /></td>
            <td align="center" bgcolor="#FFFFFF"><input type="text" name="unit" value="支" readonly /></td>
            <td align="center" bgcolor="#FFFFFF"><input type="text" name="price" DataType="float" Caption="单价" IsMustFill="true" Rule="blur,{this.3.2.2.4[0]}.value=this.value * ({this.3.2.4[0]}.value),2"/></td>
            <td align="center" bgcolor="#FFFFFF"><input type="text" name="number" value="0" DataType="int" DataLength="50,100" Caption="发货数量" Rule="blur,{this.3.2.4[0]}.value=this.value * ({this.3.1.4[0]}.value),2"/></td>
            <td align="center" bgcolor="#FFFFFF"><input type="text" name="totalPrice" readonly /></td>
            <td align="center" bgcolor="#FFFFFF"><input type="text" name="baleType" readonly  /></td>
          </tr>
        </table></td>
    </tr>
    <tr id="presentReasonTr" style="display:none" >
      <td align="right" class="trTwo">赠货理由:</td>
      <td  align="left" class="trOne" colspan="3"><textarea name="presentReason" cols="43" rows="3" id="presentReason"></textarea></td>
    </tr>
    <tr>
      <td colspan="4" align="center" class="trOne"><input type="submit" name="button" id="button" value="提交"   class="submit" />
    <input type="button" name="button" id="button" value="返回"   class="submit" onClick="window.history.back()" /></td>
    </tr>
  </form>
</table>
<script type="text/javascript">
var v=new Validate();
v.Init({id   :"orderForm",
  mode  :0,
  focusClass :"focus",
  wrongClass :"wrongClass",
  rightClass :"rightClass"
});
$("area").OnChange=function(){
 alert("选择了"+ this.value);
}
$("area").Init()
</script>
<body>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值