您好我正在尝试显示一行,然后想要在指定的时间后删除它。
我正在实现一个计时器(使用单选按钮),这需要5秒钟来显示页面,然后它们就会消失。我想删除单选按钮所在的空间。
如何删除此空间。
我正在考虑添加一个计时器,之后空间崩溃但不知道如何实现相同的目标。
<TR id="progressBar">
<TD ALIGN=RIGHT>
<div id="progressRadios">
<input type="radio" style="width: 50px;" id="progress1" disabled>
<input type="radio" style="width: 50px;" id="progress2" disabled>
<input type="radio" style="width: 50px;" id="progress3" disabled>
<input type="radio" style="width: 50px;" id="progress4" disabled>
<input type="radio" style="width: 50px;" id="progress5" disabled>
<BR>
<input type="radio" style="width: 50px;" id="progress6" disabled>
<input type="radio" style="width: 50px;" id="progress7" disabled>
<input type="radio" style="width: 50px;" id="progress8" disabled>
<input type="radio" style="width: 50px;" id="progress9" disabled>
<input type="radio" style="width: 50px;" id="progress10" disabled>
</div>
</TD>
<TD ALIGN=LEFT>
<input type="text" id="progressPct" disabled size=1>
</TD>
</TR>
function checkProgress() {
queryJobProgress();
++m_iCheckCount;
var iRadio = Math.round(m_iProgress / 10);
document.getElementById("progressPct").value = m_iProgress;
for (var iPrev = 0; iPrev < iRadio; ++iPrev) {
var oButton = document.getElementById("progress" + iPrev);
if (oButton != null)
oButton.checked = false;
}
oButton = document.getElementById("progress" + iRadio);
if (oButton != null)
oButton.checked = true;
m_oTimer = setTimeout(function() {
checkProgress()
}, 250);
if (m_iProgress > 100 || m_iCheckCount > 40) {
resetProgressIndicator();
}
}
function resetProgressIndicator() {
clearTimeout(m_oTimer);
document.getElementById("progressPct").value = "";
document.getElementById("progress10").checked = false;
m_iProgress = -1;
m_iCheckCount = -1;
// Job not running ==>
// no need for the progress indicator.
// can allow manual adjustment of results.
document.getElementById("progressBar").style.visibility = "hidden";
//document.getElementById("semiAutoAdjustments").style.visibility = "visible";
}