zoukankan      html  css  js  c++  java
  • jquery获取页面iframe内容

    //取得整个HTML格式

    var f = $(window.frames["ReportIFrame"].document).contents().html();

    或者

    $("#iframe").contents().html();

    //取得文本格式

    var f = $(window.frames["ReportIFrame"].document).contents().text();

    或者

    $("#iframe").contents().text();

    //取得指定内容

     var f = $(window.frames["ReportIFrame"].document).contents().find("#divEditPageRemark");
     alert(f.text());

    //清空IFrame的内容

    $("#iframe").contents().find("body").html("");

  • 相关阅读:
    PG
    unzip
    yum
    PG
    SQL
    Grails
    Grails
    Grails
    Chrome
    HTML
  • 原文地址:https://www.cnblogs.com/andysd/p/3685554.html
Copyright © 2011-2022 走看看