您好我正在使用来自http://www.fyneworks.com/jquery/star-rating/#tab-Testing的jQuery星级评分插件,效果很好,但是当用户点击评分时,我需要获得div“hoverstarresult”中显示的评分值.Net功能。
Protected Sub Btn_click(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Write(hoverstarresult.InnerHtml)
End Sub
上述函数始终返回空值。有任何想法吗?谢谢你的帮助
以下是星级评分代码:
<script type="text/javascript">
$(function () {
$('.hover-star1').rating({
focus: function (value, link) {
var tip = $('#hoverstarresult');
tip[0].data = tip[0].data || tip.html();
tip.html(link.title || 'value: ' + value);
},
click: function (value, link) {
var tip = $('#hoverstarresult');
$('#hoverstarresult').html(tip[0].data || '');
}
});
});
</script>
<input class="hover-star1" type="radio" name="test-3B-rating-1" value="1" title="Very poor"/>
<input class="hover-star1" type="radio" name="test-3B-rating-1" value="2" title="Poor"/>
<input class="hover-star1" type="radio" name="test-3B-rating-1" value="3" title="OK"/>
<input class="hover-star1" type="radio" name="test-3B-rating-1" value="4" title="Good"/>
<input class="hover-star1" type="radio" name="test-3B-rating-1" value="5" title="Very Good"/>
<div id="hoverstarresult" runat="server"></div>