摘要:
一、取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= 阅读全文