公告栏里直接显示
<div class="gn_box">
<h2><center><font color="#E80017" style="font-size: 18px;">距离第六届虚拟现实研讨会还有</font></center></h2>
<br/>
<center>
<div id="CountMsg" class="HotDate">
<span id="t_d" style="font-size: 18px;">X 天</span>
<span id="t_h" style="font-size: 18px;">X 时</span>
<span id="t_m" style="font-size: 18px;">X 分</span>
<span id="t_s" style="font-size: 18px;">X 秒</span>
</div>
<br>
<a href="https://19492035.xyz" style="font-size: 16px; color: #0000FF;">会议报名</a>
</center>
<script type="text/javascript">
function getRTime() {
var EndTime = new Date("2024/05/18 08:00:00");
var NowTime = new Date();
var t = EndTime.getTime() - NowTime.getTime();
var d = Math.floor(t / 1000 / 60 / 60 / 24);
var h = Math.floor(t / 1000 / 60 / 60 % 24);
var m = Math.floor(t / 1000 / 60 % 60);
var s = Math.floor(t / 1000 % 60);
document.getElementById("t_d").innerHTML = d + " 天";
document.getElementById("t_h").innerHTML = h + " 时";
document.getElementById("t_m").innerHTML = m + " 分";
document.getElementById("t_s").innerHTML = s + " 秒";
}
setInterval(getRTime, 1000);
</script>
</div>