特殊字符控制
<td align="right" class="thcss">手机:</td>
<td colspan="2"><input type="text" name="mobile" id="mobile"class="input_text" style="width:200px" value="<c:out value="${d.mobile}" />"
οnkeyup="this.value=this.value.replace(/\D/g,'')" maxlength="11"
onafterpaste="this.value=this.value.replace(/\D/g,'')"/></td>
<form action="${ctx}/expmanage/hadlist" id="form1" method="post">
姓名:<input type="text" name="zhname" id="zhname" class="input_text"
value="" />
<div class="clear_h10"></div>
<input type="button" class="button_01" id="nextstep" value="下一步" />
</form>
<br/>
<SCRIPT type="text/javascript">
function check() {
if ($.trim($("#zhname").val()) == '') {
scmWarn("请输入姓名!", null, 2000);
return false;
}else if($("#zhname").val().length > 24){
scmWarn("姓名的长度不能超过25字!", null, 2000);
return false;
}
return true;
}
$("#nextstep").click(function() {
if (check()) {
$("#form1").submit();
}
});
</SCRIPT>