日期:2014-05-18 浏览次数:20777 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<style>
#QuacorGrading input {
background:transparent url(upload_files/jsimg/grading.png) no-repeat scroll right center;
border:0 none;
cursor:pointer;
height:30px;
width:30px;
padding:0;
vertical-align:middle;}</style>
<div id="QuacorGrading" style="position:absolute;top:230px; left:150px"><strong>评分</strong>
<input name="1" type="button" />
<input name="2" type="button" value="2"/>
<input name="3" type="button" value="3"/>
<input name="4" type="button" value="4"/>
<input name="5" type="button" value="5"/>
<input name="6" type="button" value="6"/>
<input name="7" type="button" value="7"/>
<input name="8" type="button" value="8"/>
<input name="9" type="button" value="9"/>
<input name="10" type="button" />
<span id="QuacorGradingValue"><b><font size="5" color="#fd7d28">6.5</font></b>分</span>
<script type="text/javascript">
var GradList = document.getElementById("QuacorGrading").getElementsByTagName("input");
for(var di=0;di<parseInt(document.getElementById("QuacorGradingValue").getElementsByTagName("font")[0].innerHTML);di++){GradList[di].style.backgroundPosition = 'left center';}
for(var i=0;i < GradList.length;i++){
GradList[i].onmouseover = function(){
for(var Qi=0;Qi<GradList.length;Qi++){
GradList[Qi].style.backgroundPosition = 'right center';
}
for(var Qii=0;Qii<this.name;Qii++){
GradList[Qii].style.backgroundPosition = 'left center';
}
//alert(GradList.length);
document.getElementById("QuacorGradingValue").innerHTML = '<b><font size="5" color="#fd7d28">'+this.name+'</font></b>分';
}
}