js进度条组件封装完结版代码:wsdl描述的重点是
html⽂件:
<html>
<head>
<title>进度条</title>
<link rel="stylesheet" type="text/css" href="./myScript.css">用matlab求解傅立叶变换
engineer中文什么意思
<script type="text/javascript" src="./jquery.js"></script>
<body>
<p>设置进度值: <input type="text" id="tes1" value=""></p>
jquery下载文件进度条<script type="text/javascript" src="./myScript.js"></script>
</body>
</html>
js⽂件:
function ProcessBar() {
var num;sql数据库入门基础命令
// 创建整体的div
this.boardDiv = $("<div>");
alter table 索引this.boardDiv.addClass("boardDiv");
this.foreDiv = $("<div>");
this.foreDiv.addClass("foreDiv");
this.fontDiv = $("<div>");
this.fontDiv.addClass("fontDiv");
(num + "%");
this.boardDiv.append(this.foreDiv);
this.foreDiv.append(this.fontDiv);
//preNode = this;
}
/*-------------------------------------------------------------*/ ProcessBar.prototype.setProgress = function(num) {
if (num <= 100 && num >= 0) {
this.foreDiv.width(num * 4);
this.fontDiv.css("margin-left", num * 4);
(num + "%");
}
}
var processBar = new ProcessBar();
$(document.body).append(processBar.boardDiv);
/*-------------------------------------------------------------*/ window.setInterval(function() {
var num = $("#tes1").val();
processBar.setProgress(num);
}, 20);
// window.setInterval(processBar.fresh, 20);// 进度值刷新css⽂件:
.boardDiv{
background-color: #808080;
width:400px;
height:30px;
}
.foreDiv {
background-color: #95CA0D;    height:100%;
}
.fontDiv {
height:100%;
font-size:25px;
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。