java - 如何在倒计时中更改 txtcolor
问题描述
我正在使用此倒计时重定向到另一个页面。
<script type="text/javascript">
var timeleft = 5;
var downloadTimer = setInterval(function(){
timeleft--;
document.getElementById("countdowntimer").textContent = ((timeleft >= 10) ? timeleft : ("0" + timeleft));
if(timeleft <= 0){
clearInterval(downloadTimer);
window.location.replace("url.html");
}
},1000);
</script>
在 html 中,我使用它来激活:
<span id="countdowntimer"><font color="#C0C0C0"> </font></span>
如何更改倒计时 txt 的颜色甚至使其不可见?
请帮助一个java假人。
解决方案
推荐阅读
- javascript - 如何根据 area_id 从数组中提取对象
- python - 循环使用颜色并定义颜色图 matplotlib
- reactjs - 使用多个输入更新状态
- azure-devops - 如何使用 REST API 获取我正在关注的 azure devops 工作项?
- c# - 使用 Entity Framework 6 删除和重新插入子实体
- angular - 如果角度验证失败,则停止响应式表单提交
- netsuite - NetSuite - CSV 导入状态搜索
- angular - Angular 9 - 如何将 2 个 http.get 合并为一个 Observable
- ruby-on-rails - PG::ConnectionBad: 无法连接到服务器:当我运行 heroku run rake db:migrate 时没有获得这样的文件或目录
- python - 如何在 python tkinter 条目中发送值