时间
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let a = +prompt('请输入秒数:')
function getTime(a){
h = parseInt(a / 60 /60 % 24)
m = parseInt(a / 60 % 60)
s = parseInt(a % 60)
h = h < 10 ? '0' + h : h
m = m < 10 ? '0' + m : m
s = s < 10 ? '0' + s : s
console.log(h, m, s)
return `${h}小时${m}分钟${s}秒`
}
let str = getTime(a)
document.write(str)
</script>
</body>
</html>
99表
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
span {
display: inline-block;
width: 100px;
height: 30px;
margin: 15px;
background-color: hotpink;
text-align: center;
border-radius: 10px;
line-height: 30px;
}
</style>
</head>
<body>
<script>
for (let i = 1; i <= 9; i++) {
for (let j = 1; j <= i; j++) {
document.write(`<span>${j}*${i}=${i * j}</span>`)
}
document.write(`<br />`)
}
</script>
</body>
</html>