JS取URL参数值的一个方法

mac2022-06-30  72

Code function GetQueryValue(name) { var reg=new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r=window.location.search.substr(1).match(reg); if (r!=null) return unescape(r[2]); return ""; }

转载于:https://www.cnblogs.com/KenBlove/archive/2008/10/14/1310581.html

最新回复(0)