anchor.diff:  	//使用ajax方法访问，验证账户名是否存在
   	function validate() {
   		checknull($("#username").val(), "username");
  -		$
  -				.ajax({
  -					type : "POST",
  -					url : "ValidateUsernameServlet",
  -					data : {
  -						username : $("#username").val()
  -					},
  -					success : function(message) {
  -						var validateMessage = $("#validateMessage");
  -						var data = JSON.parse(message);
  -						if (data.flag) {
  -							if ($("#username").val() == ""
  -									|| $("#username").val().Trim() == "") {
  -								validateMessage.html("");
  -								return;
  -							}
  -							validateMessage.html(data.msg);
  -							validateMessage.css({
  -								color : "green"
  -							});
  -							checknull($("#username").val(), "username");
  -
  -						} else {
  -							validateMessage.html("<font name=error>" + data.msg
  -									+ "</font>");
  -							validateMessage.css({
  -								color : "red"
  -							});
  -							checknull($("#username").val(), "username");
  -
  -						}
  +		$.ajax({
  +			type : "POST",
  +			url : "ValidateUsernameServlet",
  +			data : {
  +				username : $("#username").val()
  +			},
  +			success : function(message) {
  +				var validateMessage = $("#validateMessage");
  +				var data = JSON.parse(message);
  +				if (data.flag) {
  +					if ($("#username").val() == ""
  +							|| $("#username").val().Trim() == "") {
  +						validateMessage.html("");
  +						return;
   					}
  -				});
  +					validateMessage.html(data.msg);
  +					validateMessage.css({
  +						color : "green"
  +					});
  +					checknull($("#username").val(), "username");
  +
  +				} else {
  +					validateMessage.html("<font name=error>" + data.msg
  +							+ "</font>");
  +					validateMessage.css({
  +						color : "red"
  +					});
  +					checknull($("#username").val(), "username");
  +
  +				}
  +			}
  +		});
   
   	}
   
   	//验证密码
   	function check() {
   		var password = form1.firstpassword.value;
  -		var number=0, alpha=0;
  +		var number = 0, alpha = 0;
   		var len = password.length;
  -		if (len != 0){
  -			for (var i=0; i<len; i++){
  -				if((password[i]>='a'&&password[i]<='z')||(password[i]>='A'&&password[i]<='Z')){
  +		if (len != 0) {
  +			for ( var i = 0; i < len; i++) {
  +				if ((password[i] >= 'a' && password[i] <= 'z')
  +						|| (password[i] >= 'A' && password[i] <= 'Z')) {
   					alpha++;
  -				}else if(password[i]>='0'&&password[i]<='9'){
  +				} else if (password[i] >= '0' && password[i] <= '9') {
   					number++;
   				}
   			}
   		}
   		if (form1.firstpassword.value != form1.secondpassword.value) {
   			confirminfo.innerHTML = "<font name=error color=red>两次输入的密码不相符</font>";
  -		} else if(len != (number+alpha)){
  +		} else if (len != (number + alpha)) {
   			confirminfo.innerHTML = "<font name=error color=red>含有非法字符，密码只能包含数字和字母</font>";
  -		} else if(number == 0){
  +		} else if (number == 0) {
   			confirminfo.innerHTML = "<font name=error color=red>不含数字，请输入数字字母组合</font>";
  -		}else if(alpha == 0){
  +		} else if (alpha == 0) {
   			confirminfo.innerHTML = "<font name=error color=red>不含字母，请输入字母数字组合</font>";
  -		}else{
  +		} else {
   			confirminfo.innerHTML = "<font color=green>两次输入的密码相符</font>";
   		}
   		checknull($("#secondpassword").val(), "secondpassword");
  
positive.code: 				<legend>员工信息</legend>
  				<tr>
  					<td>提示信息:</td>
  					<td><font color="red">${requestScope.msg}</font>
  					</td>
  				</tr>
  				<table class="formtable">
  					<tr>
  
negative.code: 										<option value="${department.departmentname}">${department.departmentname}</option>
  									</c:if>
  								</c:forEach>
  						</select></td>
  					</tr>
  					<tr>
  						<td colspan="6" class="command"><input type="submit"
  							class="clickbutton" value="注册" id="register_button"
  							disabled="disabled" /> <input type="reset" class="clickbutton"
  							value="重置" /></td>
  					</tr>
  				</table>
  			</fieldset>
  