|
60精币
function ShowSecond(tSeconds){
tSeconds--;
var tMsg = '正在解锁中';
if (tSeconds >= 0) {
tMsg = '距离截止还有<span class="text-red">'+tSeconds+'</span>秒';
}
$("#svcseconds").html(tMsg);
if(tSeconds+6<0){
svcgames();
}else{
setTimeout("ShowSecond(" + tSeconds + ")", 1000);
}
} 想要取出返回值 tSeconds 麻烦大神告知怎么实现!!!
补充内容 (2020-4-10 13:38):
function svcgames(){
$.ajax({
type:"POST",
url:"/ajax.php",
dataType:"json",
data:"act=svcgames&key="+Math.random(),
success:function(strJson){
if(strJson==null){
return false;
}else if(strJson.error==10000){
$('#iShow').html(strJson.msg);
tSeconds = strJson.seconds;
tLi = strJson.tLi;
startScroll();
ShowSecond(tSeconds);
}
} |
|