My code is:
function changeText() { document.getElementById('button').innerHTML = 'Downloading...'; }
Button:
<button id = "button" onclick='changeText()' value='Change Text'>Download file as CSV</button>
I want the button to change to “Download ...” and return to “Download as CSV” in a few seconds, is this possible in JS?
javascript function
Sean9113
source share