日期:2014-05-16 浏览次数:20431 次
// 找出 name 为a_qyxxhjh_nd 的 input, 注意它的id是A1
var input = document.getElementById("A1");
if ( ... ) { // 检查 input.value 是否填写了数据
//todo
}
<table width="588" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80" height="24">
<input type="radio" name="a_dzsw" value="已开展" onclick=hh.style.display='block'>
已开展
</td>
<td width="505">
<div id=hh style=display:none>
年度:<input type="text" name="a_qyxxhjh_nd" size="12" id="A1" value="" class="input_on" onfocus="this.className='input_out';this.onmouseout=''" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_on'};" onmousemove="this.className='input_move'" onmouseout="this.className='input_on'" />
名称: <input type="text" name="a_qyxxhjh_mc" size="12" value="" id="A1" class="input_on" onfocus="this.className='input_out';this.onmouseout=''" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_on'};" onmousemove="this.className='input_move'" onmouseout="this.className='input_on'" />
</div>
</td>
</tr>
<tr>
<td height="24" colspan="2">
<input type="radio" name="a_dzsw" value="未开展" checked onclick=hh.style.display='none'>
未开展
</td>
</tr>
</table>
<INPUT TYPE="button" VALUE=" 提交" ONCLICK="CheckForm()">