<td width="82%" bgcolor="#efefef" style="height:30px;position:relative">
<select name="xhgg1" class="STYLE2" id="xhgg1" style="position:absolute;width:300px; clip:rect(0 300 278 278);" onchange="document.form1.xhgg.value = document.form1.xhgg1.value">
<option value=''></option>
<option value='1'> 1 </option>
<option value='2'> 2 </option>
<option value='3'> 3 </option>
<option value='4'> 4 </option>
</select>
<input name="xhgg" type='xhgg'class="STYLE2" id='xhgg' style="position:absolute;width:300px;" onFocus="this.value='';document.form1.xhgg1.value='';" value="">
</td>
<select name="xhgg1" class="STYLE2" id="xhgg1" style="position:absolute;width:300px; clip:rect(0 300 278 278);" onchange="document.form1.xhgg.value = document.form1.xhgg1.value">
<option value=''></option>
<option value='1'> 1 </option>
<option value='2'> 2 </option>
<option value='3'> 3 </option>
<option value='4'> 4 </option>
</select>
<input name="xhgg" type='xhgg'class="STYLE2" id='xhgg' style="position:absolute;width:300px;" onFocus="this.value='';document.form1.xhgg1.value='';" value="">
</td>
请多检查的啊,eg:
<body>
<script language="javascript">
function check()
{
if (document.form1.id.value=="")
{
alert("对不起,记录号未填写,请填写!");
document.form1.id.focus()
return false;
}
if (document.form1.wtdw.value=="")
{
alert("对不起,送检单位未选择,请选择!");
document.form1.wtdw.focus()
return false;
}
if (document.form1.xhgg.value=="")
{
alert("对不起,型号规格未选择,请选择!");
document.form1.xhgg.focus()
return false;
}
}
</script>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
.STYLE2 {font-size: 16px}
.STYLE3 {font-size: 12px}
-->
</style><form name="form1" method="post" action="add.asp?action=ok" >
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr bgcolor="#4E5960">
<td height="20" align="center" class="heading"><font color="#FFFFFF" class="STYLE2"><b>证 书 / 报 告 录入</b></font></td>
</tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolor="#000000">
<tr>
<td colspan="2" bgcolor="#bfbfbf">
<div align="left" class="STYLE2">测量设备信息</div> </td>
</tr>
<tr>
<td width="18%" bgcolor="#bfbfbf">
<div align="center" class="STYLE2">id:</div> </td>
<td width="82%" bgcolor="#efefef">
<input name="id" type="text" class="STYLE2" value="" size="20" maxlength="20"> </td>
</tr>
<tr>
<td width="18%" bgcolor="#bfbfbf">
<div align="center" class="STYLE2">委托单位:</div> </td>
<td width="82%" bgcolor="#efefef">
<input name="wtdw" type="text" class="STYLE2" value="" size="60" maxlength="200"></td>
</tr>
<tr>
<td width="18%" bgcolor="#bfbfbf">
<div align="center" class="STYLE2">测量设备名称:</div> </td>
<td width="82%" bgcolor="#efefef">
<input name="sbmc" type="text" class="STYLE2" value="" size="30" maxlength="100"> </td>
</tr>
<tr>
<td width="18%" bgcolor="#bfbfbf">
<div align="center" class="STYLE2">型号规格:</div> </td>
<td width="82%" bgcolor="#efefef" nowrap><input name="xhgg" type='xhgg'class="STYLE2" id='xhgg' style="position:relative;width:300px; top:-1px;" onFocus="this.value='';document.form1.xhgg1.value='';" value="">
<select name="xhgg1" class="STYLE2" id="xhgg1" style="position:absolute;left:176;width:300px; clip:rect(0 300 278 278);" onchange="document.form1.xhgg.value = document.form1.xhgg1.value">
<option value=''></option>
<option value='1'> 1 </option>
<option value='2'> 2 </option>
<option value='3'> 3 </option>
<option value='4'> 4 </option>
</select>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#bfbfbf">
<div align="center" class="STYLE1">
<label>
<input name="okclick" type="button" class="STYLE2" id="okclick" onclick="check()" value="录入记录" />
<input name="reset" type="button" class="STYLE2" id="button" value="取消" />
<input name="return" type="button" class="STYLE2" id="button" value="返回主页面" />
</td>
</tr>
</table>
</form>
</body>