javascript创建不重复随机数
有这么一个需求:CMS在页面一容器内输出50个a标签(该容器为display:none),要我随机从这容器取出10个a,放到另一容器内。
本能反应:建立一个随机数组,然后clone节点,放到另一容器... 还没有评论哦 »
有这么一个需求:CMS在页面一容器内输出50个a标签(该容器为display:none),要我随机从这容器取出10个a,放到另一容器内。
本能反应:建立一个随机数组,然后clone节点,放到另一容器... 还没有评论哦 »
Mike West说:
Scope is one of the foundational aspects of the JavaScript language, and probably the one I’ve struggled with the most when building complex programs. I can’t count the number of times I’ve lost track of what the this... 有一条评论了 »
废话不多说,先给出CSS
body{margin:100px 0}
.clear:after{content:”.”; display:block; height:0; clear:both; visibility:hidden}.clear{display:inline-block}.clear{display:block}
div#nav{height:70px; background:url(img/... 2 条评论 »
google是个大公司,全世界都有google的脚印,韩国的google动画效果非常不错,蓝色理想论坛里已经有人挖过来了,可惜js写的太多了,那自己写一个吧?好,就这么干!
原理
小时候,总喜欢看动画... 有一条评论了 »