在Javascript重定向窗口位置后获取页面的URL

Get the URL of a page after a Javascript redirection windows location How to i Src LInk

本文关键字:URL 获取 Javascript 重定向 窗口 位置      更新时间:2023-09-26

示例:将windows.location=重定向后的链接粘贴到浏览器地址栏1:主链路http://example.com/v?id=xxxxxxx&itag=36重定向后像这样显示2:重定向链路https://r10---sn-4wg7en7l.c.docs.google.com我如何获得第二个链接iframe SRC请任何人在这方面的帮助

您可以在javascript中使用window.location.href获得页面的url或使用document.referrer获得上一页
在PHP中,你可以用$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']获取当前页面用$_SERVER['HTTP_REFERER']获取前一个页面