[英]jQuery Star Rating Plugin with ASP.Net
Hi I'm using the jQuery Star Rating Plugin from http://www.fyneworks.com/jquery/star-rating/#tab-Testing which works great, but I need to get the rating value that is displayed in the the div 'hoverstarresult' when the user clicks upon a rating using a .Net function. 嗨,我使用的是http://www.fyneworks.com/jquery/star-rating/#tab-Testing上的jQuery Star Rating插件,效果很好,但我需要获取div中显示的评分值当用户使用.Net函数单击评分时,“ hoverstarresult”。
Protected Sub Btn_click(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Write(hoverstarresult.InnerHtml)
End Sub
The above function always returns an empty value. 上面的函数总是返回一个空值。 Any ideas? 有任何想法吗? Thanks for any help 谢谢你的帮助
Here is the star rating code: 这是星级评分代码:
<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>
You can try this link 您可以尝试此链接
http://www.dotnetcurry.com/ShowArticle.aspx?ID=440 http://www.dotnetcurry.com/ShowArticle.aspx?ID=440
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.