<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>progress 和 meter 元素</title>
</head>
<body>
<script>
function btn(){
for(var i=0;i<=100;i++){ //先执行完循环再执行下面的函数
setTimeout(updateprogress(i),2000);
}
}
function updateprogress(newValue){
var progressBar=doc.getElementById("p");
progressBar.value=newValue;
progressBar.getElementsByTagName("span")[0].textContent=newValue;
}
</script>
<section>
<h2>progress元素的使用</h2>
<p>完成的百分比<progress id="p" max="100" style="background-color: #646464"><span>0</span>%</progress></p>
<input type="button" value="点击"/>
</section>
<!-- <progress id="progress" max="100" value="50"></progress>-->
</body>
</html>