![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS记录
xgnewlife
属风象星座天秤座的我,有很高的审美意识,不但洞察能力强、喜好平衡,拥有像风一般自由自在的智能、脑筋灵活敏捷,是个能多方面捕捉事物的思考者。【爱好魔兽与风速同行的跑跑^_^】
展开
-
取2个日期的天数
function periodDays(begin_date,end_date){ //date_pattern yyyy-MM-dd begin_date = begin_date.replace(/-/g, "/"); end_date = end_date.replace(/-/g, "/"); begin_date = new Date(begin_date); end原创 2009-08-28 17:06:00 · 472 阅读 · 0 评论 -
判断数组中,是否有重复的选项。
在网上看到牛人写的正则表达式: <!-- function mm(a) { return /(/x0f[^/x0f]+)/x0f[/s/S]*/1/.test("/x0f"+ a.join("/x0f/x0f") +"/x0f"); } var ary = new Array(转载 2009-07-03 17:13:00 · 659 阅读 · 1 评论 -
JavaScript中原型的冰山一角。。prototype
String.prototype.trim = function(){ return this.replace(/(^/s*)|(/s*$)/g, "");}//给string添加了一个属性方法,该方法用于去除掉string中首尾的空白字符。原创 2009-07-03 17:18:00 · 349 阅读 · 1 评论