<form class="simple-form" action="create" method="post" οnsubmit="return notNUllConmit();" id="formQ">
<div>
<div class="input-box">
<table width="700" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="right">限额名称 </td>
<td width="242" align="left"><input class="input-css" name="quotaName" type="text" id="qName"></td>
<td width="358" align="left"> </td>
</tr>
</table>
</div>
<div class="input-box">
<table width="700" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="right">限额代码 </td>
<td width="242" align="left"><input class="input-css" name="quotaCode" type="text" id="qCode"></td>
<td width="358" align="left"> </td>
</tr>
</table>
</div>
<div class="input-box">
<table width="700" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="right">限额值 </td>
<td width="242" align="left"><input class="input-css" name="quotaValue" type="text" id="qv"></td>
<td width="358" align="left"> </td>
</tr>
</table>
</div>
<div class="input-box">
<table width="700" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="right"><p>类型</p></td>
<td align="left"><label for="select"></label>
<select name="quotaType" " id="select">
<option value="1" id="quotaType1" >会员</option>
<option value="2" id="quotaType2">企业</option>
<option value="3" id="quotaType3">商户</option>
<option value="4" id="quotaType4" >代运营</option>
<option value="5" id="quotaType5">物流</option>
<option value="6" id="quotaType6">仓储</option>
</select></td>
</tr>
</table>
</div>
<div class="input-box">
<table width="700" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="right"><p>交易</p></td>
<td width="89" align="left"><label for="select">
<input type="radio" name="tradeType" id="checkbox" value="1" checked>
付款</label></td>
<td width="87" align="left"><input type="radio" name="tradeType" id="checkbox2" value="2" >
<label for="checkbox2">退款</label></td>
<td width="101" align="left"><input type="radio" name="tradeType" id="checkbox3" value="3" >
<label for="checkbox3">提现</label></td>
<td width="323" align="left"><input type="radio" name="tradeType" id="checkbox4" value="4" >
<label for="checkbox4">结算</label></td>
</tr>
</table>
</div>
<div class="input-box">
<table width="700" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="431" align="right"><input type="button" name="button" id="button" value="保存" οnclick="notNUllConmit();"></td>
<td width="269" align="center"><input type="button" name="button2" id="button2" value="返回" οnclick="back()"></td>
</tr>
</table>
</div>
</form>
</div>
</div>
</div>
<script>
function notNUllConmit(){
if(notNUllqName()&¬NUllqCode()&¬NUlldateqv()&&onlyNum()){
document.getElementById("formQ").submit();
return true;
}else{
return false;
}
}
function notNUllqName(){
var qName=document.getElementById("qName").value;
if(qName==""){
alert("请输入名称!");
return false;
}else{
return true;
}
}
function notNUllqCode(){
var qCode=document.getElementById("qCode").value;
if(qCode==""){
alert("请输入限额代码!");
return false;
}else{
return true;
}
}
function notNUlldateqv(){
var qv=document.getElementById("qv").value;
if(qv==""){
alert("请输入限额值!");
return false;
}else{
return true;
}
}
function onlyNum(){
var qv=document.getElementById("qv").value;
var re = /^[0-9]+.?[0-9]*$/;
if (!re.test( qv))
{
alert("限额值只能是数字!");
return false;
}else{
return true;
}
}
function back(){
window.history.back();
}
</script>
<!--中部-->
<!--底部-->
<div class="footer">版权信息</div>
<!--底部-->
</div>
js验证表单
最新推荐文章于 2013-03-28 16:13:08 发布