js获取url参数
http://www.cnblogs.com/fishtreeyu/archive/2011/02/27/1966178.html
function GetQueryString(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}