项目实例:深投控股--star rating评分插件
<script src="~JS/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="~JS/jquery.rating.js" type="text/javascript" language="javascript"></script>
<link href="~JS/jquery.rating.css" type="text/css" rel="stylesheet" />
<div id="controls" class="controls" style="padding: 5px; clear: both;" onclick="$(this).next().val($('input[@name=star]:checked').val() || '0' );">
<input type="radio" class="star" name="star" value="1" />
<input type="radio" class="star" name="star" value="2" />
<input type="radio" class="star" name="star" value="3" />
<input type="radio" class="star" name="star" value="4" />
<input type="radio" class="star" name="star" value="5" />
</div>
<asp:TextBox ID="txtStar" runat="Server" style="display:none"></asp:TextBox>
<asp:Repeater ID="RptSubList" runat="server" OnItemDataBound="RptSubList_ItemDataBound">
<ItemTemplate>
<div class="postbit" id="reply_<%#Eval("ConsultId").ToString()%>">
<table cellspacing="0" cellpadding="5" width="94%" border="0" style="margin: 10px auto 0 auto;">
<tbody>
<tr class="postbit_header" style="color: #666666;">
<td colspan="2">
<span class="postbit_name"><%#Eval("UserName")%></span>
<span id="controls" class="controls" style="padding: 5px; clear: both;">
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="1" disabled="disabled" <%# Eval("ConsultType").ToString()=="1" ? "checked" : "" %> />
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="2" disabled="disabled" <%# Eval("ConsultType").ToString()=="2" ? "checked" : "" %>/>
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="3" disabled="disabled" <%# Eval("ConsultType").ToString()=="3" ? "checked" : "" %> />
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="4" disabled="disabled" <%# Eval("ConsultType").ToString()=="4" ? "checked" : "" %> />
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="5" disabled="disabled" <%# Eval("ConsultType").ToString()=="5" ? "checked" : "" %> />
</span><span class="postbit_time"> <%#Eval("CreateDate")%></span>
</td>
</tr>
<tr>
<td>
<div class="postbit_content"><%#Eval("Content")%></div>
</td>
</tr>
</tbody>
</table>
</div>
</ItemTemplate>
<AlternatingItemTemplate>
<div class="postbit" id="reply_<%#Eval("ConsultId").ToString()%>">
<table cellspacing="0" cellpadding="5" width="94%" border="0" style="margin: 10px auto 0 auto;">
<tbody>
<tr class="postbit_header" style="color: #666666;">
<td colspan="2">
<span class="postbit_name"><%#Eval("UserName")%></span>
<span id="controls" class="controls" style="padding: 5px; clear: both;">
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="1" disabled="disabled" <%# Eval("ConsultType").ToString()=="1" ? "checked" : "" %> />
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="2" disabled="disabled" <%# Eval("ConsultType").ToString()=="2" ? "checked" : "" %>/>
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="3" disabled="disabled" <%# Eval("ConsultType").ToString()=="3" ? "checked" : "" %> />
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="4" disabled="disabled" <%# Eval("ConsultType").ToString()=="4" ? "checked" : "" %> />
<input type="radio" class="star" name="star_<%#this.RptSubList.Items.Count %>"
value="5" disabled="disabled" <%# Eval("ConsultType").ToString()=="5" ? "checked" : "" %> />
</span><span class="postbit_time"> <%#Eval("CreateDate")%></span>
</td>
</tr>
<tr>
<td>
<div class="postbit_content"><%#Eval("Content")%></div>
</td>
</tr>
</tbody>
</table>
</div>
</AlternatingItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>