提问人:Isha Lad 提问时间:7/25/2023 更新时间:7/25/2023 访问量:40
如何使用 js 跟踪 iframe 的导航
How to track nevigation of iframe using js
问:
我正在使用 iframe 显示另一个跨平台网站 我想知道用户在 iframe 标记中访问的 url 我知道它需要同源策略,但它不允许 当用户更改导航并刷新父页面时,iframe 将返回到原始阶段,但我想将其更改为用户上次在 iframe 中访问的页面。可能吗? 我试过这个:
iframe.contentWindow.console[logType] = function() {
logUtil.log.apply(logUtil, arguments);
original.apply(iframe.contentWindow.console, arguments);
};
答: 暂无答案
评论
postMessage