dsplos5731 2015-03-25 11:50
浏览 16

用户导航后是否可以使用PHP获取子iframe的URL?

We are building an educational tool whereby students opens a website in another tab/window and then searches around the other site. Once finding the information they enter the url of the page they were on into a box. Its a bit clunky and what we want to do is allow them to open the new site (bbc.co.uk for example) within an iframe that has a header at the top allowing htem to return to their workbook.

When they navigate around the BBC site, we would like for them to be able to click a button on our frame which grabs what url they are on and some other info like page header etc and insert that automatically into their workbook.

However I cant seem to find how to grab the url of the page being viewed within the iframe. As we send them to bbc, I can get the source id easily enough but as soon as they start moving around the bbc site doing their research there is no way for the parent iframe (on our domain) to see what page they are on?

I know this is not possible in JS due to XSS issues, but was wondering if there is a workaround. Or any other way to grab the url. Currently our way of doing things is clunky, we want to make the tool a lot more easier.

Thanks Paul

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 西门子S7-Graph,S7-300,梯形图
    • ¥50 用易语言http 访问不了网页
    • ¥50 safari浏览器fetch提交数据后数据丢失问题
    • ¥15 matlab不知道怎么改,求解答!!
    • ¥15 永磁直线电机的电流环pi调不出来
    • ¥15 用stata实现聚类的代码
    • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
    • ¥20 docker里部署springboot项目,访问不到扬声器
    • ¥15 netty整合springboot之后自动重连失效
    • ¥15 悬赏!微信开发者工具报错,求帮改