Something like this:
function deleteConfirmPasswordText()
{
if(document.getElementById("txtPassword").value == "") {
document.getElementById("txtConfirmPassword").value = "";
}
return false;
}
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClientClick="return deleteConfirmPasswordText();" />
Note: return false is because the form shouldn't post if the password text box is empty. You must have these validations in place, both at client side and server side.
Hope this helps!