<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>新增标签</title>
<style type="text/css">
time {
width: 200px;
height: 200px;
background-color: orange;
}
embed {
width: 100%;
}
</style>
</head>
<body>
<time>2022/07/01</time> <br />
<progress id="progress" value="0" max="100"></progress>%
<span id="p">0</span>
<select>
<option value="12">李明</option>
<option value="13">王红</option>
<option value="14">赵刚</option>
</select>
<input type="text" name="" list="select" />
<datalist id="select">
<option value="李明">姓名</option>
<option value="12">年龄</option>
<option value="中">性别</option>
</datalist>
<br />
<!-- 嵌入 -->
<embed src="embed.txt" />
<embed src="../03_音视频/media/01.jpg" />
<embed src="header.html" />
<script>
var pro = document.getElementById("progress");
var p = document.getElementById("p");
function timer(num) {
let count = 0;
let intervalId = setInterval(function () {
pro.value += 1;
p.innerText = pro.value;
count++;
if (count === num) {
clearInterval(intervalId);
}
}, 1000);
}
timer(100);
</script>
</body>
</html>
?上述运行结果: