您的位置:首页 > Web前端 > HTML5

html5 progress

2016-07-21 22:27 573 查看
<!doctype html>
<html>
<head>
<title>progress</title>
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript">
var currentValue = 0;//进度条当前数据
var maxValue = 100;//进度条最大值
var myIndex;
$(function () {
$('#myProgress').val(currentValue);
$('#myProgress').attr('max', maxValue);
myIndex = setInterval(plusValue, 100);
});
function plusValue() {
if (currentValue < maxValue) {
currentValue++;
$('#myProgress').val(currentValue);
} else {
clearInterval(myIndex);
alert('加载完成');
}
}
</script>
</head>
<body>
<progress id="myProgress" ></progress>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  html5 progress