I have the following button in my PHP file which is defines as follows:
<div class="row"style="margin-top: 15px;" >
<div class="col-sm-3" id="mybuttonDiv">
<button class="btn btn-primary" onclick="printMessage();">Submit</button>
</div>
</div>
There is a separate javascript file where I have printMessage()
function defined as follows:
function printMessage(){
alert("Test");
}
So the alert executes when I click on the submit button. Instead of printing the message using alert, I am wondering if I can print a simple message (like “Your request has been submitted!”) below the submit button using jQuery maybe or anything simpler.?