Updating the balance of after each withdrawal or deposit in javascript

I want to show update balance after each deposit or withdraw request. Also, if withdraw amount is more than current balance, then I want to show the message that says insufficient money and also show the cuurent balance.

Deposit – add the amount that is deposited to the account and output a success
message and the new balance.
Withdraw – attemot to perform a withdraw with the amount requested. The account
must have the as much or more than the requested withdraw amoiun to allow the
withdrawal. If the user has less than the amoiunt requested, give an “Insufficient Funds”
message and do not allow the withdrawa. If the account has as much or more than the
requested amohnt, perform the withdrawal by subtracting fornt he balance.Either way,
re-print the balance of the account

here is my HTML and CSS and also my so far javasript code

<html>
<head>
<title></title>

<style type="text/css">

body {
    background-image: url("https://newton.ncc.edu/gansonj/ite154/img/bank-bkg.jpg");
    font-family: arial;
    text-align: right;
    color: #008B8B;
}

#pagewrap {
    border: 8px #EEB76B solid;
    padding: 10px;
    width: 800px;
    min-height: 600px;
    border-radius: 25px;
    text-align: center;
    background: #212121;
    margin: 40px auto 0px auto; 
}


#title {
    font-size: 2.2em;
    border-bottom: 7px #EEB76B double;
    padding: 10px 0px 10px 0px;
    color: #EEB76B;
    text-align: center;
}

.formtext {
    text-align: center;
    font-size: 1.5em;
    margin-top: 20px;
}

.bank-action {
    border: 3px #EEB76B solid;
    background-color: #310B0B;
    padding: 10px;
    border-radius: 25px;
    width: 100px;
    color: #EEB76B;
    font-size: 1.15em;
}

.bank-action:hover {
    border: 3px #000000 solid;
    background-color: #EEB76B;
    color: #351F39;
}

#output {
    height: 150px;
    width: 500px;
    padding-top: 20px;
    background-color: white;
    margin: 0px auto 30px auto;
    border: 8px #EEB76B solid;
    font-size: 1.5em;
}
.spacer {
    margin-bottom: 15px;
}

#amount {
    font-size: 1.15em;
    padding: 10px;
    border: 5px #EEB76B solid;
}
</style>

<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>

<script type="text/javascript">

$(document).ready(function(){
    var intamount =500;
    $("#output").html( intamount )


    $(".bank-action").on("click" , function(){
        var amount = parseFloat($("#amount").val() );
        var msg= "";
        var addmoney = intamount + amount;
        var withdrawmoney = addmoney - amount;
        
        
        

        var money = $(this).attr("id");

        if (money == "deposit"){
            msg+= "<div> Your deposit of $" + amount + " was successful</div>";
            msg+= "<div> Your Current Balance is $" + addmoney + "</div>";

        }
        else {
            if (amount >= intamount ){
                msg+= "<div> Due to insufficient balance,your request can't be successful</div>";
                msg+= "<div> Your Current balance is $" + addmoney + "</div>";

            }
            else {
                msg+= "<div> Your withdraw of $" + amount + " was successful</div>";
                msg+= "<div> Your Current balance is $" + withdrawmoney + "</div>";
            }
           

        }

        $("#output").html(msg);

        


    }); // end event handler

    
} );  // ends document.ready

</script> 
</head>
<body>

<div id="pagewrap">

    <div id="title">ITE154 Bank of Garden City</div>
    
    <div id="formwrap" style="margin-top: 30px;">
    
        <form>
        
            <div class="spacer formtext">
                    Enter transaction amount
            </div>
            <div class="spacer">
                    <input type="text" id="amount">
            </div>
        
            <div>
                <input type="button" class="bank-action" id="deposit" value="Deposit">
                <input type="button" class="bank-action" id="withdraw" value="Withdraw">
            </div>

    
        <div class="spacer formtext">
                Current Account Balance
        </div>
        <div id="output"></div>
        
    </div> <!-- ends div#formwrap -->
    
</div> <!-- ends div#pagewrap -->

</body>
</html>

<!– end snippet –>