input,testarea验证

<%@ page session="true" contentType="text/html; charset=UTF-8" %>
<script language="javascript">
 function changeMachineCode(theSelect) { 
  url =
   'saleDoc!showSaleClassified.action?'+
   'saleCode=<ww:property value='saleBuy.buyCode' />'+
   '&saleType=BUY&viewDetailPage=showSaleClassified'+
   '&curMachineCode='+
   theSelect.options[theSelect.selectedIndex].value;
  //alert(url);
  window.location = url;
 }
 function textMaxLen(i){
   var conMaxLen=i.getAttribute? parseInt(i.getAttribute("maxlength")):"";
   if(i.getAttribute && i.value.length>conMaxLen){
   i.value=i.value.substring(0,conMaxLen)
   }
 }
 
</script>
<table width="100%"  border="0" cellpadding="1" cellspacing="1" class="system" bgcolor="#1F6EBB">
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">活动代码</font></td>
  <td class = "font2" colspan= "4">
   <ww:property value='saleCode' />
   <input type="hidden" name="saleBuy.buyCode"
      value="<ww:property value='saleBuy.buyCode' />">   
  </td>
 </tr>
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">活动子类代码名称</font></td>
  <td class = "font2" colspan= "4">
   <input type="hidden" name="curMachineCode"
      value="<ww:property value='curMachineCode' />">     
 <ww:iterator value="saleBuy.dBuys">
  <ww:if test="curMachineCode.trim() == machineCode.trim()">
   <ww:property value="machineCode"/>:<ww:property value="machineName"/>
  </ww:if>
 </ww:iterator> 
 <!--
  <select name="curMachineCode" id="thecurMachineCode" οnchange="changeMachineCode(this)">
  <ww:iterator value="saleBuy.dBuys">
   <option value="<ww:property value="machineCode"/>" <ww:if test="curMachineCode.trim() == machineCode.trim()">selected</ww:if>>
    <ww:property value="machineCode"/>:<ww:property value="machineName"/>
   </option>
  </ww:iterator>         
 </select>  
 -->
   <input type="hidden" name="saleBuy.machineCode"
      value="<ww:property value='saleBuy.machineCode' />">     
  </td>
 </tr>
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">子类类别</font></td>
  <td class = "font2" colspan= "4">
   统购手机
   <input type="hidden" name="saleBuy.detailType"
      value="<ww:property value='saleBuy.detailType' />">   
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">赠送终端型号</font></td>
  <td class = "font2" colspan= "4">
   <ww:property value='saleBuy.machineName' /> 
   <input type="hidden" name="saleBuy.machineName"
      value="<ww:property value='saleBuy.machineName' />">     
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">终端数量</font></td>
  <td class = "font2" colspan= "4">
   <input type="text" name="saleBuy.sendCount" maxlength="6"
      value="<ww:property value='saleBuy.sendCount' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 台</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">月最低消费</font></td>
  <td class = "font2" colspan= "4">
   <input type="text" name="saleBuy.minMonthConsumption" maxlength="5"
      value="<ww:property value='saleBuy.minMonthConsumption' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 元</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">预存金额</font></td>
  <td class = "font2" colspan= "4">
   <ww:property value='saleBuy.prePayFee' /> 
   <input type="hidden" name="saleBuy.prePayFee" maxlength="10"
      value="<ww:property value='saleBuy.prePayFee' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 元</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">签约承诺时间</font></td>
  <td class = "font2" colspan= "4">
   <input type="text" name="saleBuy.contractCommitDate" maxlength="2"
      value="<ww:property value='saleBuy.contractCommitDate' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 月</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">终端成本价</font></td>
  <td class = "font2" colspan= "4">
   <ww:property value='saleBuy.machineFee' /> 
   <input type="hidden" name="saleBuy.machineFee" maxlength="10"
      value="<ww:property value='saleBuy.machineFee' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 元</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">终端补缴款</font></td>
  <td class = "font2" colspan= "4">
   <input type="text" name="saleBuy.cellPhoneAddFee" maxlength="5"
      value="<ww:property value='saleBuy.cellPhoneAddFee' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 元</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">扣减积分</font></td>
  <td class = "font2" colspan= "4">
   <input type="text" name="saleBuy.deductPoint" maxlength="15"
      value="<ww:property value='saleBuy.deductPoint' />" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
   onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
   ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"
   style="ime-mode:Disabled"><font class="font2"> 分</font>
  </td>
 </tr> 
 <tr class = "red">
  <td class = "bgcolor" align="center" width="20%"><font class="font3">备注</font></td>
  <td class = "font2" colspan= "4">
   <textarea name="saleBuy.remark" cols="60" maxlength="400"
   onKeyUp="return textMaxLen(this);" onBlur="return textMaxLen(this);">
   <ww:property value='saleBuy.remark'/></textarea>
  </td>
 </tr>  
</table>

input,testarea验证

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值