请参阅:
一、制作或选取一张图片作为进度条样式。
二、在原来的调用代码的 Create 之后增加代码,形成完整代码如下,其中红色为新增加的内容,2.jpg 为第一步中所做的图片,请确认地址。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ITPOW控件——进度条</title>
</head>
<body>
<div id="progress"></div>
<div><input type="button" value="重新演示" onclick="javascript:progress.SetPos(0);" /></div>
<script type="text/javascript" language="javascript" src="http://www.itpow.com/upload/LPC03JB30IFR976A/CProgress.js"></script>
<script type="text/javascript" language="javascript">
<!--
//ITPOW www.itpow.com
var progress = new CProgress("progress", 0, 100, 0);
progress.progressWidth = 300;
progress.progressHeight = 25;
progress.Create();
progress.progressId.style.backgroundColor = "#CCCCCC";
progress.barId.style.background = "none";
progress.barId.style.backgroundImage = "url('http://www.itpow.com/upload/LPC03JB30IFR976A/2.jpg')";
progress.barId.style.backgroundPosition = "center left";
progress.barId.style.backgroundRepeat = "no-repeat";
setInterval("progress.Inc();", 10);
//-->
</script>
</body>
</html>