摘要: 一、取URL中的参数function getParameterByName(name) { var match = RegExp('[?&]' + name + '=([^&]*)') .exec(window.location.search); return match && decodeURIComponent(match[1].replace(/\+/g, ' '));}二、正则分组var testStr="<div><img src='/a.jpg' alt=&# 阅读全文
posted @ 2012-07-25 18:33 草根程序猿 阅读(15457) 评论(47) 推荐(65)