grab global variable from an embedded iframe

后端 未结 2 2027
自闭症患者
自闭症患者 2021-02-09 06:27

say an HTML page (Page.htm) contains the following...


Now this

相关标签:
2条回答
  • 2021-02-09 06:49

    This:

    <iframe id="child_frame" src="http://" />
    

    Should be:

    <iframe name="child_frame" src="http://" />
    

    The iframe attribute "id" should be changed to "name".

    0 讨论(0)
  • 2021-02-09 07:00

    Your first syntax should work IF you're on the same doamin.

    If the IFRAME is loading a page from another domain then you won't be able to access it.

    0 讨论(0)
提交回复
热议问题