<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<Style>
</Style>
<body>
<script>
window.οnlοad=function(){
var sec=30;
setInterval(function(){
var num=document.querySelector('#num');
num.innerHTML=sec--;
},1000);
}
</script>
<font color ="red"><h2 align="right">倒计时</h2>
<font color ="red"><h3 align="right" id="num" size="7">30</h3></font>
</body>
</html>