Printing message below submit button

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.?

document.getElementById("someElementBeneathTheSubmit").innerHTML="Your request has been submitted!";

But next time you may want to make a search for some keywords by yourself first…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.