您好,欢迎来到模板无忧!
登录
注册
闁衡偓閹増顥�
闁瑰吋绮庨崒锟�
闁革附婢樺ù锟�
閻㈩垼鍠栨慨锟�
模板无忧
网页特效
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
关闭顶部
展开顶部
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
AI小聚 能写会画
域名
推荐
展开边栏
关闭边栏
网页特效代码
模板无忧
>
网页特效
>
图片特效特效代码
>
收藏
分享
查看评论
图片特效
演示
仿淘宝星星投票,兼容性好_图片特效特效
查看演示效果
特效Tag:
投票
添加
织梦DedeCMS视频教程
买空间 租服务器 选网硕互联!
无忧站长工具,百度权重一键全查!
仿淘宝星星投票,兼容性好,淘宝网在交易完毕后有一个星星投票,看着很漂亮。
<script language="javascript"> yg_Ratings.Msgs = new Array ( "差", "及格", "一般", "比较好", "棒极了" ); yg_Ratings.Labels = new Array ( "1 Star", "2 Stars", "3 Stars", "4 Stars", "5 Stars" ); var path = "http://www.dphost.cn/images/yri_"; yg_Ratings.starbar = "star_"; yg_Ratings.UnitY = "yellow.gif"; yg_Ratings.UnitYMouseOver = "yellow.gif"; yg_Ratings.UnitYMouseLess = "grey.gif"; yg_Ratings.UnitN = "white.gif"; yg_Ratings.UnitNMouseOver = "hover.gif"; yg_Ratings.DefaultMsg = " "; function yg_Ratings(id, button, inputname, defaultval,type) { var i, t; var attributes; var h1, h2; var d = document; var style; this.starbar = type + "_"; this.rating = 0; this.showbutton = button; if (defaultval < 1 || defaultval > 5) { defaultval = 0; } this.rating = defaultval; attributes = 'class="ygrtngs" id="' + id + '" style="' + style + '"'; h1 = 'onMouseOut="return yg_Ratings_mouseOut(' + id + ');"'; d.write('<span ' + attributes + ' ' + h1 + '>'); if (defaultval > 0 && type == "star") { d.write('<div class="msg" id="'+id+'_msg">'+yg_Ratings.Msgs[defaultval-1]+'</div>'); } else { d.write('<div class="msg" id="'+id+'_msg" style=\"display:none\">'+yg_Ratings.DefaultMsg+'</div>'); } if (this.showbutton) { d.write('<span><strong>Rate it:</strong></span>'); } for (i = 1; i <= yg_Ratings.Msgs.length; i++) { h1 = 'onMouseOver="return yg_Ratings_mouseOver(' + id + ', ' + i + ');"'; h2 = 'onClick="return yg_Ratings_click(' + id + ', ' + i + ');"'; d.write('<span class="unit "' + h1 + ' ' + h2 + '>'); if (i <= defaultval) { d.write('<img src="http://p1.mb5u.com/texiao/1/20110225160503293.unity + " />'); } else { d.write('<img src="http://p1.mb5u.com/texiao/1/20110225160503294.unitn + " />'); } d.write('</span>'); } if(defaultval){ d.write('<input type="hidden" name="'+inputname+'" id="input_'+id+'" value="' + defaultval + '" />'); } else { d.write('<input type="hidden" name="'+inputname+'" id="input_'+id+'" />'); } this.input = document.getElementById('input_'+id); d.write('</span>'); this.parent = document.getElementById(id); this.images = this.parent.getElementsByTagName("img"); this.msg = document.getElementById(id + '_msg'); this.id = id; var children = this.msg.childNodes; var node; for (var i = 0; i < children.length; i++) { node = children[i]; if (node.nodeType == 3) { this.DefaultMsg = node.nodeValue; } } } function yg_Ratings_set(n, oflag) { if (arguments.length < 2) oflag = true; this.rating = n; this.DefaultMsg = yg_Ratings.Msgs[n-1]; // if (this.showbutton) { this.showBtn("btnSave"); // } this.update(n, oflag); } function yls_Ratings_showSubmit(sBtn) { var saveButton = document.getElementById(sBtn); if(saveButton != null) { saveButton.style.display="block"; } } function yg_Ratings_setMsg(m) { var children = this.msg.childNodes; var node; for (var i = 0; i < children.length; i++) { node = children[i]; if (node.nodeType == 3) { node.nodeValue = m; } } } function yg_Ratings_get() { return this.rating; } function yg_Ratings_update(n, oflag) { if (this.starbar == 'star_') { if (oflag) { this.setMsg(this.DefaultMsg); } else { this.setMsg(yg_Ratings.Msgs[n - 1]); } } if (n == this.rating) { this.input.setAttribute("value", n); } for (i = 1; i <= yg_Ratings.Msgs.length; i++) { if (oflag) { if (i <= this.rating) this.images[i - 1].src = path + this.starbar + yg_Ratings.UnitY; else this.images[i - 1].src = path + this.starbar + yg_Ratings.UnitN; } else { if (i <= n) { if (i <= this.rating) this.images[i - 1].src = path + this.starbar + yg_Ratings.UnitYMouseOver; else this.images[i - 1].src = path + this.starbar + yg_Ratings.UnitNMouseOver; } else { if (i <= this.rating) this.images[i - 1].src = path + this.starbar + yg_Ratings.UnitYMouseLess; else this.images[i - 1].src = path + this.starbar + yg_Ratings.UnitN; } } } return true; } function yg_Ratings_click(obj, n) { obj.set(n, false); return true; } function yg_Ratings_mouseOver(obj, n) { obj.update(n, false); return true; } function yg_Ratings_mouseOut(obj) { obj.update(0, true); return true; } yg_Ratings.prototype.set = yg_Ratings_set; yg_Ratings.prototype.setMsg = yg_Ratings_setMsg; yg_Ratings.prototype.get = yg_Ratings_get; yg_Ratings.prototype.update = yg_Ratings_update; yg_Ratings.prototype.showBtn = yls_Ratings_showSubmit; </script> 访问速度: <script> if (document.getElementById) { // Support for Class A. _ratings_proj1_ = new yg_Ratings("_ratings_proj1_", false, "proj1", 0, "star"); } else { // Support for poor DOM (low grade). document.write('<small><input type=radio name="proj1" value="1">'); document.write('<input type=radio name="proj1" value="2">'); document.write('<input type=radio name="proj1" value="3">'); document.write('<input type=radio name="proj1" value="4">'); document.write('<input type=radio name="proj1" value="5"></small>'); } </script> <noscript><small> <input type=radio name="proj1" value="1"> <input type=radio name="proj1" value="2"> <input type=radio name="proj1" value="3"> <input type=radio name="proj1" value="4"> <input type=radio name="proj1" value="5"></small></noscript> 性价比: <script> if (document.getElementById) { // Support for Class A. _ratings_proj2_ = new yg_Ratings("_ratings_proj2_", false, "proj2", 0, "star"); } else { // Support for poor DOM (low grade). document.write('<small><input type=radio name="proj2" value="1">'); document.write('<input type=radio name="proj2" value="2">'); document.write('<input type=radio name="proj2" value="3">'); document.write('<input type=radio name="proj2" value="4">'); document.write('<input type=radio name="proj2" value="5"></small>'); } </script> <noscript><small> <input type=radio name="proj2" value="1"> <input type=radio name="proj2" value="2"> <input type=radio name="proj2" value="3"> <input type=radio name="proj2" value="4"> <input type=radio name="proj2" value="5"></small></noscript> </td></tr><tr><td> 服务质量:</td><td> <script> if (document.getElementById) { // Support for Class A. _ratings_proj3_ = new yg_Ratings("_ratings_proj3_", false, "proj3", 0, "star"); } else { // Support for poor DOM (low grade). document.write('<small><input type=radio name="proj3" value="1">'); document.write('<input type=radio name="proj3" value="2">'); document.write('<input type=radio name="proj3" value="3">'); document.write('<input type=radio name="proj3" value="4">'); document.write('<input type=radio name="proj3" value="5"></small>'); } </script> <noscript><small> <input type=radio name="proj3" value="1"> <input type=radio name="proj3" value="2"> <input type=radio name="proj3" value="3"> <input type=radio name="proj3" value="4"> <input type=radio name="proj3" value="5"></small></noscript> </td><td> 安全性:</td><td> <script> if (document.getElementById) { // Support for Class A. _ratings_proj4_ = new yg_Ratings("_ratings_proj4_", false, "proj4", 0, "star"); } else { // Support for poor DOM (low grade). document.write('<small><input type=radio name="proj4" value="1">'); document.write('<input type=radio name="proj4" value="2">'); document.write('<input type=radio name="proj4" value="3">'); document.write('<input type=radio name="proj4" value="4">'); document.write('<input type=radio name="proj4" value="5"></small>'); } </script> <noscript><small> <input type=radio name="proj4" value="1"> <input type=radio name="proj4" value="2"> <input type=radio name="proj4" value="3"> <input type=radio name="proj4" value="4"> <input type=radio name="proj4" value="5"></small></noscript>
所属频道:
图片特效特效
/
更新时间:2012-12-01
[收藏]
[报错]
[返回列表]
相关
图片特效特效
:
图片自动缩放
图像过来
禁止对图片用右键(仅支持IE)
图片的渐显播放效果的代码
对联式的图片广告代码
页面的左右下脚始终固定不动的图片广告代码
图片渐渐出现脚本
图象淡入淡出 Script
经典相册效果
左右移动的图片
图像映射
图形循环渐显脚本
图片特效特效Rss订阅
特效代码搜索
图片特效特效推荐
纯CSS图片切换特效
黑色风格带缓冲的JS焦点图代码
常用JS图片滚动(无缝、平滑、上下左右滚动)代码大全
图片控制内容框的文字上下翻滚
JavaScript判断图片是否能够加载,失败则替换默认图片
一行代码解决图片放大小图的功能
纵向图片滚动JS代码
浮动的图片广告
JavaScript图片扭曲变形效果
图片自动缩放
猜你也喜欢看这些
CSS省略号代码
字体变化效果
光照文字效果(点光源)
网页文本自适应宽度滚动
JS实现跟随鼠标的滚动文字提示
一个JavaScript文字扭曲效果
Js随机文字显示
动态波浪效果的文字
JS显示、隐藏文字
动态文字
相关链接:
复制本页链接
|
搜索仿淘宝星星投票,兼容性好
特效说明:
图片特效模板
-
仿淘宝星星投票,兼容性好
。
收藏&分享
QQ空间
新浪微博
腾讯微博
人人网
开心网
百度搜藏
复制网址
更多...