获取iframe的url路径:

  window.parent.document.getElementById("Ateon-SetParent-iframe").contentWindow.location.search;    //需要iframe的ID

 

根据参数名称通过正则获取参数值

function geturl(name) {
            var reg = new RegExp("[^\?&]?" + encodeURI(name) + "=[^&]+");
            var arr = window.parent.document.getElementById("Ateon-SetParent-iframe").contentWindow.location.search.match(reg);
            if (arr != null) {
                return decodeURI(arr[0].substring(arr[0].search("=") + 1));
            }
            return "";
        }

 

相关文章:

  • 2021-11-20
  • 2021-10-30
  • 2021-05-04
  • 2021-09-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-02-24
  • 2022-12-23
相关资源
相似解决方案