<form class="form" name="frmedit" id="frmedit" method="post">
	<input type="hidden" name="action" id="action" value="update" />
    <fieldset>
        <div class="frow">
            <label class="col4 flabel">旧密码：</label>
            <div class="col8 last">
				<input type="password" class="text" name="oldpass" id="oldpass" maxlength="20" style="width:160px" value="" />
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">新密码：</label>
            <div class="col8 last">
				<input type="password" class="text" name="newpass" id="newpass" maxlength="20" style="width:160px" value="" />
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">确认密码：</label>
            <div class="col8 last">
				<input type="password" class="text" name="repass" id="repass" maxlength="20" style="width:160px" value="" />
            </div>
        </div>
		<div class="frow">
			<button type="button" class="btn btn-primary btn-large" id="clksave" name="submit">保　存</button>
		</div>
    </fieldset>
</form>
<script>
$(function(){
	var dosave = false;
	$("#clksave").tap(function () {
		if(dosave) return;
		dosave = true;
		$.post('passedit.php', $('#frmedit').serialize(), function(res){
			if(res.flag==0) {
				dosave = false;
				popTip(res.msg);
			} else {
				popTip('密码修改成功，请牢记您的新密码');
				setTimeout(function(){window.location.href='/member/';}, 1000);
			}
		}, 'json')
    })
})
</script>