<script type="text/javascript">
function checkInput(idVal, altContent) {
var obj = document.getElementById(idVal)
if (obj.value == "" || obj.length <= 0) {
obj.focus()
alert(altContent)
return false
}
return true
}
function mngsubmit() {
var flag = new Boolean(true)
var inputs = ["xm","sfzh"] //需校验字段 id
for (var i = 0; i < inputs.length; i ++) {
flag = checkInput(inputs[i], "请填写完整信息");
if (!flag) return;
}
if (flag) {
document.forms[0].submit()
}
}
</script>
文本框限制最长字数---maxlength="18" --