customer.jsp页面iframe.iframe有一个按钮.点击按钮,我需要访问customer.jsp页面内的对话框.window.parent.document.getElementById('formDialog');但我正在获得null价值.window.parent.document.getElementById('target');
Run Code Online (Sandbox Code Playgroud)
两种资源都应该是同一个来源
您可以通过以下方式访问父窗口元素parent.document.getElementById('formDialog');
如果您得到 null,您是否能够在该 Iframe 父级的上下文中获取该元素?您是否引用了正确的 ID 和正确的父级?
| 归档时间: |
|
| 查看次数: |
22469 次 |
| 最近记录: |