iframe中的表的选择器

时间:2014-07-28 20:30:01

标签: jquery html css iframe

我有一个包含5个iframe元素的页面。他们每个人都有一个文件。其中一个iframe有一个名为hawbtable的表。我想找到hawb表中的行数,提醒每行中每个“hawb”列的值

iframe中的

,id =“body”name =“body”.. 我有一个名为“hawbTable”的表,有十行...... 每一行都有一个名为“Hawb”的列...... 我想在控制台中记录该单元格中的值。我该怎么做?

我一直在尝试识别iframe的内容,但它们不会作为元素返回。相反,它们作为数组返回,因为哪些选择器不能对它们起作用

<html>
<head>
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE7">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
<script type="text/javascript" src="javascript/jquery-1.9.1.js"></script>
<script type="text/javascript" src="javascript/jquery-ui.js"></script>
<link rel="stylesheet" href="javascript/jquery-ui2.css">
<title>EZ-VIEW Reports</title>
<meta name="chromesniffer" id="chromesniffer_meta"
    content="{&quot;jQuery&quot;:&quot;1.9.1&quot;,&quot;jQuery UI&quot;:&quot;1.10.3&quot;}">
<script type="text/javascript"
    src="chrome-extension://homgcnaoacgigpkkljjjekpignblkeae/detector.js"></script>
</head>
<body style="background-color: #fff; margin-left: 0; margin-top: 0;">
    <div id="StayFocusd-infobar" style="display: none;">
        <img
            src="chrome-extension://laankejkbhbdhmipfmgcngdelahlfoji/common/img/eye_19x19_red.png">
        <span id="StayFocusd-infobar-msg"></span> <span
            id="StayFocusd-infobar-links"> <a
            id="StayFocusd-infobar-never-show">hide forever</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a id="StayFocusd-infobar-hide">hide once</a>
        </span>
    </div>
    <table width="1200" border="0" align="left">
        <tbody>
            <tr>
                <td colspan="2" align="left"><iframe src="Header.jsp?stflg=C"
                        name="head" scrolling="no" frameborder="0" id="head"
                        style="height: 160px; width: 100%;"></iframe></td>
            </tr>
            <tr>
                <td id="searchCell" width="21%" align="left" style="width: 2%;"><iframe
                        style="height: 590px; margin-left: 5px; margin-right: 0px; width: 100%;"
                        frameborder="0" id="search" name="search" src="DDSReportSearch.do"
                        scrolling="no"></iframe></td>
                <td id="bodyCell" width="79%" style="width: 95%;"><iframe
                        style="overflow-x: hidden; height: 590px; border-collapse: collapse; width: 100%;"
                        frameborder="0" id="body" name="body" scrolling="auto"
                        src="body.jsp"></iframe></td>
            </tr>
            <tr>
                <td colspan="2" align="left"><iframe src="Footer.jsp"
                        name="head" scrolling="no" frameborder="0" id="head2"
                        style="height: 30px; width: 1200px; text-align: right;"></iframe></td>
            </tr>
        </tbody>
    </table>
    <iframe frameborder="0" scrolling="no"
        style="border: 0px; display: none; background-color: transparent;"></iframe>
    <div id="GOOGLE_INPUT_CHEXT_FLAG" input="null"
        input_stat="{&quot;tlang&quot;:true,&quot;tsbc&quot;:true,&quot;pun&quot;:true,&quot;mk&quot;:false,&quot;ss&quot;:true}"
        style="display: none;"></div>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

$('#body').contents().find('#hawbTable>tbody>tr').each(function(){
    var tr=this;
    console.log(tr);

    });
相关问题