<script language=javascript>
function star(id,type){
for(i=1;i<=5;i++){
document.getElementById("img"+type+i).src="images/star_g.jpg";
}
for(i=1;i<=id;i++){
document.getElementById("img"+type+i).src="images/star_r.jpg";
}
}
function unstar(id,type){
for(i=1;i<=5;i++){
document.getElementById("img"+type+i).src="images/star_g.jpg";
}
for(i=1;i<=document.getElementById("text"+type).value;i++){
document.getElementById("img"+type+i).src="images/star_r.jpg";
}
}
function starit(id,type){
document.getElementById("text"+type).value=id;
if(id>=1 && id<=2){
document.getElementById("span"+type).innerHTML="印象不怎么好,您打了<font style='color:#FF0000;font-family:arial;font-weight:bold'>"+id+"</font>分";
}else if(id>=3 && id<=4){
document.getElementById("span"+type).innerHTML="<font>印象还不错,您打了<font style='color:#FF0000;font-family:arial;font-weight:bold'>"+id+"</font>分";
}else if(id=5){
document.getElementById("span"+type).innerHTML="<font>印象很好,您打了<font style='color:#FF0000;font-family:arial;font-weight:bold'>"+id+"</font>分";
}
}
</script>
服务:<?php
for($i=1;$i<=5;$i++){
?>
<img src=images/star_g.jpg width=20 height=20 id="imgfw<?=$i?>" onmouseover="star(<?=$i?>,'fw')" onmouseout="unstar(<?=$i?>,'fw')" onclick="starit(<?=$i?>,'fw')">
<?
}
?>
<input type=hidden id="textfw">
<span id="spanfw"></span>
<br/>
质量:<?php
for($i=1;$i<=5;$i++){
?>
<img src=images/star_g.jpg width=20 height=20 id="imgzl<?=$i?>" onmouseover="star(<?=$i?>,'zl')" onmouseout="unstar(<?=$i?>,'zl')" onclick="starit(<?=$i?>,'zl')">
<?
}
?>
<input type=hidden id="textzl">
<span id="spanzl"></span>
<br/>
价格:<?php
for($i=1;$i<=5;$i++){
?>
<img src=images/star_g.jpg width=20 height=20 id="imgjg<?=$i?>" onmouseover="star(<?=$i?>,'jg')" onmouseout="unstar(<?=$i?>,'jg')" onclick="starit(<?=$i?>,'jg')">
<?
}
?>
<input type=hidden id="textjg">
<span id="spanjg"></span>