赶项目,有个类似京东评价页面 满意度五星效果是怎么写 这个应该是前段的事情吧;这页面就是扒的京东的.但我不知道他这个 星星效果是怎么做的. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!doctype html><html lang="en"><head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title> 页面名称 </title><style type="text/css">.box { color: #999;}.box .sel { color: #f00;}</style></head><body><script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script><span class="box"> <span>★</span> <span>★</span> <span>★</span> <span>★</span> <span>★</span></span><span>0</span>分<script type="text/javascript">$(function(){ $(".box span").click(function(event){ $(this).parent().find("span").addClass("sel"); $(this).nextAll().removeClass("sel"); $(this).parent().next().text($(this).index()+1); });});</script></body></html> 如何不被网盾及浏览器阻止打开新窗口 求验证合法文件路径的js 如何实现多张并排图片拖动排序? 如何在alt或title=里显示图片和文字等信息 相当构造函数???? 怎样通过JS在选中一个RadioButton后,改变后面显示文字的属性? 大家给看看,不知道怎么办了 消息提醒的功能,能用js开发吗? 如何实现其他按键切换光标位置? 如何控制表单的隐藏/显示 获取相同class的a标签的一组html()值 jquery中的事件模拟问题
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title> 页面名称 </title>
<style type="text/css">
.box {
color: #999;
}
.box .sel {
color: #f00;
}</style>
</head>
<body>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<span class="box">
<span>★</span>
<span>★</span>
<span>★</span>
<span>★</span>
<span>★</span>
</span><span>0</span>分
<script type="text/javascript">
$(function(){
$(".box span").click(function(event){
$(this).parent().find("span").addClass("sel");
$(this).nextAll().removeClass("sel");
$(this).parent().next().text($(this).index()+1);
});
});</script>
</body>
</html>