<form id="formAdd" method="post">
<input type="hidden" name="dosubmit" value="1">
<table width="100%" class="grid">
	<tr>
		<td class="tdleft" width="100"><span class="red">*</span> 旧密码：</td>
		<td><input type="password" class="text" name="oldpassword" id="oldpassword" size="20" maxlength="20" value="" /></td>
	</tr>
	<tr>
		<td class="tdleft"><span class="red">*</span> 新密码：</td>
		<td><input type="password" class="text" name="password" id="password" size="20" maxlength="20" value="" /></td>
	</tr>
	<tr>
		<td class="tdleft"><span class="red">*</span> 重复新密码：</td>
		<td><input type="password" class="text" name="repassword" id="repassword" size="20" maxlength="20" value="" /></td>
	</tr>
</table>
<div><input type="submit" name="submit" id="submit" class="button dodialog" value="提 交"/></div>
</form>
<script type="text/javascript">
$(function(){
	$.formValidator.initConfig({formid:"formAdd",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'250',height:'50'}, function(){this.close();$(obj).focus();})}});
	$("#oldpassword").formValidator({onshow:"请输入旧密码",onfocus:"密码应该为6-20位之间",oncorrect:"输入正确"}).inputValidator({min:6,max:20,onerror:"密码应该为6-20位之间"});
	$("#password").formValidator({onshow:"请输入密码",onfocus:"密码应该为6-20位之间",oncorrect:"输入正确"}).inputValidator({min:6,max:20,onerror:"密码应该为6-20位之间"});
	$("#repassword").formValidator({onshow:"请输入确认密码",onfocus:"两次密码输入不同。",oncorrect:"密码输入一致"}).compareValidator({desid:"password",operateor:"=",onerror:"两次密码输入不同。"});
	$("#formAdd").ajaxForm({
        dataType: "json",
        success : function(data){
			if(data.flag == 0){
				doTip(data.msg);
			}else{
				window.top.art.dialog({id:'editPass'}).close();
				doTip('密码修改成功');
			}
        }
    });
})
</script>