0
I created a button to download files on my site, which displays the text "Download (XXX MB)".
<a class="a_btn_download" href="LINK DO ARQUIVO'><span class="span_baixar">Baixar</span> <span class="span_size">(XXX MB)</span></a>
As the file size is large the download takes a little to start. So I want the span with the class "span_size", which shows the file size, to have the text changed to "Wait...".
How can I do with a javascript code?
Selects the element in the DOM with the function
querySelector
orgetElementsByClassName
, then changes the contents of the propertytextContent
orinnerHTML
. Want to try?– Woss