window.parent.document.getElementById("xxx");获取父窗口的xxx节点
$("#myEle", window.parent.document).html(html);

即指明了是在 window.parent.document 中查找 id=myEle 的元素。

随着前面的问题的解决(其实是对 jQuery 的了解不够),现在两种方案都可以实现我需要的效果了。

另外还有一种实现方式,代码如下:

1.parent.$("#myEle").html(html);
这种方法要求父文档也要调用 jQuery 。

获取父窗口的xxx节点的方法的更多相关文章

  1. jQuery获取父级、兄弟节点的方法

    一.jQuery的父节点查找方法 $(selector).parent(selector):获取父节点 $(selector).parentNode:以node[]的形式存放父节点,如果没有父节点,则 ...

  2. jquery 获取父窗口的元素 父窗口 子窗口

    一.获取页面元素 取父窗口的元素方法:$(selector, window.parent.document); 那么你取父窗口的父窗口的元素就可以用:$(selector, window.parent ...

  3. 解析jquery获取父窗口的元素

    ("#父窗口元素ID",window.parent.document); 对应javascript版本为window.parent.document.getElementByIdx ...

  4. jQuery 获取父窗口的元素 父窗口 子窗口(iframe)

    $("#父窗口元素ID",window.parent.document); 对应javascript版本为window.parent.document.getElementById ...

  5. jquery获取父窗口的元素[转]

    $("#父窗口元素ID",window.parent.document); 对应javascript版本为window.parent.document.getElementById ...

  6. jquery 获取父窗口的元素、父窗口、子窗口

    一.获取父窗口元素: $("#父窗口元素ID",window.parent.document):对应javascript版本为window.parent.document.getE ...

  7. 获取父窗口元素或者获取iframe中的元素(相同域名下)

    jquery方法 在父窗口中获取iframe中的元素 //方法1 $("#iframe的ID").contents().find("iframe中的元素"); ...

  8. frameset子窗口获取父窗口失败原因?

    报错信息: arrow.html:44 Uncaught SecurityError: Blocked a frame with origin "null" from access ...

  9. window.open子窗口获取父窗口的值

    //子窗口获取父窗口id的值 window.opener.document.getElementById("id").value; //子窗口调用父窗口的函数 window.ope ...

随机推荐

  1. bochs的bochsrc说明

    ########################################## Configuration file for bochs          ################### ...

  2. Javascript 京东轮播图

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  3. C++重写new和delete,比想像中困难

    关于C++内存管理这话题,永远都不过时.在我刚出道的时候,就已经在考虑怎么检测内存泄漏(https://www.cnblogs.com/coding-my-life/p/3985164.html).想 ...

  4. APK签名说明

    在 Android 系统下, 一些公司会将自己做的APK进行管控,授权签名后方可使用. APK所属的软件公司会提供签名包,例如: 第一步:是要检查所操作的 PC 机是否安装 JDK,如果没有安装,请安 ...

  5. jmeter启动报错

    # ./jmeter-server Using local port: 1099Server failed to start: java.rmi.server.ExportException: Lis ...

  6. sql优化之concat/concat_ws/group_concat

    原文1:https://baijiahao.baidu.com/s?id=1595349117525189591&wfr=spider&for=pc 原文2:https://www.y ...

  7. mybatisplus打印sql语句

    package com.osplat.config; import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; ...

  8. flask中缓存cache导入时引发的错误

    安装 pip install flask-cache 初始化 from flask_cache import Cache cache = Cache(config={ 'CACHE_TYPE': 's ...

  9. Window上编译最新版libCef(Branch 2704)(转载)

    转自http://blog.csdn.net/mfcing/article/details/52066579 1.开发环境搭建   VS2010及以上版本,CMake 2.8.12.1及以上版本.我安 ...

  10. pyautogui 文档(五):截图及定位功能

    截图函数 PyAutoGUI可以截取屏幕截图,将其保存到文件中,并在屏幕中查找图像.如果您有一个小图像,例如需要单击并希望在屏幕上找到它的按钮,这将非常有用.这些功能由PyScreeze模块提供,该模 ...