![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
ad0128
这个作者很懒,什么都没留下…
展开
-
js去除重复元素的两种方法收藏
<br />/*方法一*/var a = new Array( 1, 1, 1, 2, 3, 4, 1, 2, 5,11); alert(a.reverse().join(",").match( /([^,]+)(?!.*/1)/ig).reverse()); /*方法二*/ Array.prototype.strip = function () { if (this.length < 2) return [this[0]] || [];原创 2010-05-31 23:43:00 · 664 阅读 · 0 评论 -
兼容IE6,IE7,IE8,FF的JQuery 垂直二级导航菜单
<br /><!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> <title>导航条</title> <mce:style type="text/css"><!--body{margin原创 2010-06-05 23:25:00 · 5051 阅读 · 2 评论 -
获取中文拼音首字母
<br /><!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> <title>获取中文拼音首字母</title> <mce:script type="text/javascript"><!-转载 2010-06-08 15:20:00 · 10359 阅读 · 0 评论