我有刷新功能
function refresh(nRefresh)
{
TimerSetting = document.all.curRefresh.Timer;
document.all.curRefresh.Timer = 'On';
nTimeOut = nRefresh;
updateKnlButtons();
psStatusUpdate();
}
此功能重新加载页面。单击按钮后,我给 refresh(5) 以在 5 秒后刷新页面。由于某种原因,我想在刷新函数完成后触发一个函数,但是在刷新函数完成之前这个函数被触发。如何确保在刷新函数完成后调用禁用函数
function disableButton()
{
idStopSelBtn.style.cursor='wait';
idStartSelBtn.style.cursor='wait';
idBounceRunningBtn.style.cursor='wait';
idStopAllBtn.style.cursor='wait';
idStartAllBtn.style.cursor='wait';
idBounceSelBtn.style.cursor='wait'
idStopSelBtn.src='images/Button/Disabled/Stop-Selected.gif';
idStartSelBtn.src='images/Button/Disabled/Start-Selected.gif';
idBounceRunningBtn.src='images/Button/Disabled/Bounce-Running.gif';
idStopAllBtn.src='images/Button/Disabled/Stop-All.gif';
idBounceSelBtn.src='images/Button/Disabled/Bounce-Selected.gif'
idStartAllBtn.src='images/Button/Disabled/Start-All.gif';
idStopSelBtn.onclick="return false";
}