<html>
<head>
<title>查看/修改</title>
<script language="JavaScript" src="script/trim.js"></script>
<script language="JavaScript">
function check(){
document.all.mf.submit();
}
</script>
</head>
<body bgcolor="#EBF5FD">
<jsp:useBean id="userBean" class="wyf.zrk.UserBean" scope="session"/>
<table width="100%" height="44" bgcolor="#206AB3">
<tr align="center"><td>
<font color="#FFFFFF" size="5">电表信息管理</font>
<font color="#FFFFFF" size="2">--电表信息添加</font>
</td></tr>
</table>
<table>
<tr><td><a href="javascript:history.back()">
<img border="0" src="img/back.jpg"/></a>
</td></tr>
</table>
<hr color="black" size="1"/>
<form action="ManageServlet" method="post" id="mf">
<table width="80%" border="0" cellspacing="1" bgcolor="black" align="center">
<tr bgcolor="white">
<td align="center">管理员姓名:</td>
<td><input name="name" id="name" /></td>
</tr>
<tr bgcolor="white">
<td align="center">居住地址:</td>
<td>
<select name="address">
<%
//获取WebApplicationContext
WebApplicationContext wac=
WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
DButil db = (DButil)wac.getBean("DButil");
List<String> address = db.getHouseAddress();
for(String name:address){
%>
<option value="<%= name %>" ><%= name %></option>
<%
}
%>
</select>
</td>
</tr>
<tr bgcolor="white">
<td align="center">电表类型:</td>
<td><input name="mtype" id="mtype" /></td>
</tr>
<tr bgcolor="white">
<td align="center"> 电表型号:</td>
<td><input name="machine" id="machine" /></td>
</tr>
<tr bgcolor="white">
<td align="center">运营商:</td>
<td><input name="company" id="company" /></td>
</tr>
<tr bgcolor="white">
<td align="center">安装时间:</td>
<td><input name="cometime" id="cometime" /></td>
</tr>
<tr bgcolor="white">
<td align="center">所在区域:</td>
<td><input name="region" id="region" /></td>
</tr>
</table>
<table align="center">
<tr>
<td><img border="0" src="img/xg.gif" id="xg" onclick="JavaScript:check()"
style="cursor:hand"
onmouseover="document.all.xg.src='img/xga.gif'"
onmouseout="document.all.xg.src='img/xg.gif'"
onmouseup="document.all.xg.src='img/xga.gif'"
onmousedown="document.all.xg.src='img/xgb.gif'"/></td>
<td><img border="0" src="img/cze.gif" id="cz" onclick="JavaScript:document.all.mf.reset()"
style="cursor:hand"
onmouseover="document.all.cz.src='img/czd.gif'"
onmouseout="document.all.cz.src='img/cze.gif'"
onmouseup="document.all.cz.src='img/czd.gif'"
onmousedown="document.all.cz.src='img/czc.gif'"/></td>
</tr>
</table>
<input type="hidden" name="action" value="adduser"/>
</form>
</body>
</html>
我想在 安装时间 那里的input后面添加确认格式为yyyy-mm-dd的正则表达式,上但加上去后却会直接跳过,求大神帮忙,顺便再求大神解惑一下javascript的check()方法和input的submit属性的区别,我这个例子可以改成用submit的方法吗,我现在无论怎么加正则表达式,我下面点击下面的图片都会运行check方法直接跳转,我该怎么处理才好?