alert(GetIframeQueryString("regionCode","mumap"));
//获取iframe嵌套的页面的url参数,第一个参数为需要获取的参数名,第二个参数为iframe的id.function GetIframeQueryString(name,id) {var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');/*var iframeSrc=window.parent.document.getElementById("studyManageIframe").contentWindow.location.href ;*/var r =window.parent.document.getElementById(id).contentWindow.location.search.substr(1).match(reg);if (r != null) {return decodeURI(r[2]);}return null;}
如果觉得《获取iframe src中参数》对你有帮助,请点赞、收藏,并留下你的观点哦!