Page Code:
<div id="faqdiv" style="display:none;">
<h1>,!</h1>
<h3><span id="successName" style="color: orangered"></span>,<a></a>...</h3>
<h4><span id="time">10</span></h4>
<h5><a href="/">| ...</a></h5>
<div id="loader">
<div id="top"></div>
<div id="bottom"></div>
<div id="line"></div>
</div>
</div>
js Code:
setTimeout(function(){
window.location.href="/";
},10000);//10
after();
var i=10;
//
function after(){
$("-sharptime").css("color","red").empty().append(i);
i=i-1;
setTimeout(function(){
after();
},1000);
}
$("input[name="userName"]").siblings(".form_hint").hide();
$("-sharpfaqbg").css({display:"block",height:$(document).height()});
$("-sharpsuccessName").text($("input[name="userName"]").val());
$("-sharpfaqdiv").css("top","280px");
$("-sharpfaqdiv").css("display","block");
document.documentElement.scrollTop=0;
the effect of this code is to pop up a box with a countdown effect, but because the code is executed from top to bottom, there will be a delay in seconds of the countdown
is empty for a while before it appears, and then jumps to the page in 1 second, without waiting for 0 seconds