从另一个页面更改iframe的“src”。

时间:2022-10-28 20:17:56

I have a page 'A' which has link to another page 'B'. On page 'B' there is an iframe. I have no control on page 'B' i.e. I cannot edit page 'B'. Ask is to change 'src' of an iframe on page 'B' on click of link on page 'A'.

我有一个页面“a”,它链接到另一个页面“B”。在B页上有一个iframe。我没有控制页面B,也就是说我不能编辑B页。要求是在页面“A”上点击链接时,将iframe的“src”改为“B”。

1 个解决方案

#1


0  

All else being equal: No.

其他条件都相同:不。

Page B could be written so that it takes some external input (such as a query string on its URL) which it uses to set different values for the src attribute of the iframe … but that isn't typical so you'd probably have to modify B (which you said you can't do) in order to create such a feature.

页B可以写成这样需要一些外部输入(如在其URL查询字符串),它使用iframe的src属性设置不同的值,但这不是典型的所以你可能必须修改B(你说你不能做的)为了创建这样的特性。

#1


0  

All else being equal: No.

其他条件都相同:不。

Page B could be written so that it takes some external input (such as a query string on its URL) which it uses to set different values for the src attribute of the iframe … but that isn't typical so you'd probably have to modify B (which you said you can't do) in order to create such a feature.

页B可以写成这样需要一些外部输入(如在其URL查询字符串),它使用iframe的src属性设置不同的值,但这不是典型的所以你可能必须修改B(你说你不能做的)为了创建这样的特性。