<script type="text/javascript">
        $.fn.studyplay_star = function(options, callback) {
            //默认设置
            var settings = {
                MaxStar: 20,
                StarWidth: 23,
                CurrentStar: 5,
                Enabled: true
            };
            if (options) { jQuery.extend(settings, options); };
            var container = jQuery(this);
            container.css({ "position": "relative" })
.html('<ul class="studyplay_starBg"></ul>')
.find('.studyplay_starBg').width(settings.MaxStar * settings.StarWidth)
.html('<li class="studyplay_starovering" style="width:' + settings.CurrentStar * settings.StarWidth + 'px; z-index:0;" id="studyplay_current"></li>');
            if (settings.Enabled) {
                var ListArray = "";
                for (k = 1; k < settings.MaxStar + 1; k++) {
                    ListArray += '<li class="studyplay_starON" style="width:' + settings.StarWidth * k + 'px;z-index:' + (settings.MaxStar - k + 1) + ';"></li>';
                }
                container.find('.studyplay_starBg').append(ListArray)
                container.find('.studyplay_starON').hover(function() {
                    $(this).removeClass('studyplay_starON').addClass("studyplay_starovering");
                    $("#studyplay_current").hide();
                },
  function() {
      $(this).removeClass('studyplay_starovering').addClass("studyplay_starON");
      $("#studyplay_current").show();
  })
.click(function() {
    var studyplay_count = settings.MaxStar - $(this).css("z-index") + 1;
    $("#studyplay_current").width(studyplay_count * settings.StarWidth)
    //回调函数
    if (typeof callback == 'function') {
        callback(studyplay_count);
        return;
    }
})
            }
        }
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#z").studyplay_star({ MaxStar: 10, CurrentStar: 2, Enabled: true },
        function (value) {
        var a = value;
            alert("您对该路线的评价为:" + a + "分!谢谢参与!")
        });
    });
</script><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>您的评价为:</p>
<div id="z"></div>
    </div>代码是网上拿来用的,可是现在它只是弹窗告诉我,我需要获取选中的分数放到label里,然后再插入数据库