您好,欢迎来到源码搜藏!分享精神,快乐你我!提示:担心找不到本站?在百度搜索“源码搜藏”,网址永远不丢失!
  • 首 页
  • 在线工具
  • 当前位置:首页 > 网页特效 > 鼠标特效 >

    非常漂亮的评分效果

    时间:2013-05-09 11:03 来源:互联网 作者:源码搜藏 浏览:收藏 挑错 推荐 打印
    运行代码保存代码复制代码 提示:您可以先修改部分代码再运行,保存代码功能在Firefox下无效。
    非常漂亮的评分效果

    非常漂亮的评分效果,很常用,收藏起来吧。

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    </head>
    <body>
    告诉你一个应有尽有的网页特效网址:<a href="http://www.codesocang.com">http://www.codesocang.com</a>
    <hr />
    <style>
    #QuacorGrading input {
    background:transparent url(http://www.99n9.com/upload_files/jsimg/grading.png) no-repeat scroll right center;
    border:0 none;
    cursor:pointer;
    height:30px;
    width:30px;
    padding:0;
    vertical-align:middle;}</style>
        <div id="QuacorGrading" style="position:absolute;top:230px; left:150px"><strong>评分</strong>
          <input name="1" type="button" />
                <input name="2" type="button" />
                <input name="3" type="button" />
                <input name="4" type="button" />
                <input name="5" type="button" />
                <input name="6" type="button" />
                <input name="7" type="button" />
                <input name="8" type="button" />
                <input name="9" type="button" />
                <input name="10" type="button" />
                <span id="QuacorGradingValue"><b><font size="5" color="#fd7d28">6.5</font></b>分</span>
            <script type="text/javascript">
                var GradList = document.getElementById("QuacorGrading").getElementsByTagName("input");
                for (var di = 0; di < parseInt(document.getElementById("QuacorGradingValue").getElementsByTagName("font")[0].innerHTML); di++) { GradList[di].style.backgroundPosition = 'left center'; }
                for (var i = 0; i < GradList.length; i++)
                {
                    GradList[i].onmouseover = function ()
                    {
                        for (var Qi = 0; Qi < GradList.length; Qi++)
                        {
                            GradList[Qi].style.backgroundPosition = 'right center';
                        }
                        for (var Qii = 0; Qii < this.name; Qii++)
                        {
                            GradList[Qii].style.backgroundPosition = 'left center';
                        }
                        //alert(GradList.length);
                        document.getElementById("QuacorGradingValue").innerHTML = '<b><font size="5" color="#fd7d28">' + this.name + '</font></b>分';
                    }
                }
            </script>
        </div>
    </body></html>

    非常漂亮的评分效果由源码搜藏网整理,转载请注明出处http://www.codesocang.com/texiao/shubiaotexiao/4649.html
    标签:网站源码