<asp:Button ID="uxButtonSubmit" class="button" runat="server" Text="确定"
OnClientClick="return CheckValue();" OnClick="uxButtonSubmit_Click" />
<script type="text/javascript">
function CheckValue()
{
var oldPwd = $("<%=uxTextBoxOldPwd.ClientID %>").value;
var newPwd = $("<%=uxTextBoxNewPwd.ClientID %>").value;
var checkPwd = $("<%=uxTextBoxCheckPwd.ClientID %>").value;
if(oldPwd == "")
{
showMsg("请输入旧密码");
return false;
}
if(newPwd == "")
{
showMsg("请输入新密码");
return false;
}
if(checkPwd=="")
{
showMsg("请您确认新密码");
return false;
}
if(checkPwd!=newPwd)
{
showMsg("请您确认两次输入的密码一致");
return false;
}
return true;
}
</script>
转载于:https://www.cnblogs.com/hayden/archive/2009/08/10/1542702.html