JavaScript alert box with timer

前端 未结 7 1781
粉色の甜心
粉色の甜心 2020-12-02 17:19

I want to display the alert box but for a certain interval. Is it possible in JavaScript?

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 17:30

    May be it's too late but the following code works fine

    document.getElementById('alrt').innerHTML='Please wait, Your download will start soon!!!'; 
    setTimeout(function() {document.getElementById('alrt').innerHTML='';},5000);
    
    

提交回复
热议问题