此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【wtcsy】截止到2008-06-27 18:01:25的历史汇总数据(不包括此帖):
发帖数:13 发帖分:290
结贴数:10 结贴分:220
未结数:3 未结分:70
结贴率:76.92 % 结分率:75.86 %
楼主加油
楼主【wtcsy】截止到2008-06-27 18:01:25的历史汇总数据(不包括此帖):
发帖数:13 发帖分:290
结贴数:10 结贴分:220
未结数:3 未结分:70
结贴率:76.92 % 结分率:75.86 %
楼主加油
里面的45 13 27 是从数据库取出来的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style>
.class1{
margin-top:10px;
overflow:hidden;
height:8px;
background-color:blue;
}
</style>
<script>
var percent = [];
percent[0] = 45;
percent[1] = 13;
percent[2] = 27;function showPercent(){
var sum = 0;
for(var i = 0; i < percent.length; i++){
sum += percent[0];
}
// 不知道什么原因,document.getElementsByName("divPercent")[0]居然为null,就用了下面的方法
var j=0;
for(var i = 0; (e = document.getElementsByTagName("div")[i]); i++){
if(e.name == "divPercent"){
e.style.width = (Math.floor(percent[j] / sum * 1000)) + "px";
j++;
}
}
}
</script>
</head>
<body onload="showPercent()">
<div name="divPercent" class="class1"></div>45
<div name="divPercent" class="class1"></div>13
<div name="divPercent" class="class1"></div>27
</body></html>