I had created some function calls using JavaScript and made it delay 7 seconds now I want that when a user clicks the button, a "please wait..." text(not in the button text) appears as soon as the delay time starts.
"Please wait" text should appear as headline tag(h3 or h4 tag)
Any help/suggestion, please...
function yes() {
var button = document.getElementById('test');
var name = document.getElementById('name');
var age = document.getElementById('age');
var location = document.getElementById('location');
console.log("clicked on Test-Button");
var str = 'Hello! <p> My name is Ashish</p><p>How Are You: ' + name.value +
'';
document.getElementById('test').innerHTML = str;
};
<label>
Your Name:
<input id="name" />
</label>
<br />
<button onclick="setTimeout(yes, 7000)">Test</button> <!-- timeout -->
<p id="test"></p>