Your code have one minor error.Refer below code ......
<head runat="server">
<title>Untitled Page</title>
<script type = "text/javascript">
function DisableButton() {
document.getElementById("Button4").disabled = true;
}
window.onbeforeunload = DisableButton;
</script>
<asp:Button ID="Button4" runat="server" ToolTip="Please note down your member ID for future reference"
OnClick="Button4_Click"
style="z-index: 1; left: 185px; top: 2840px; position: absolute; height:30px; width:80px; font-size:large " ForeColor="Green" Text="Submit" />