如何访问框架集中的表

How to access a table in a frameset

本文关键字:框架 集中 访问 何访问      更新时间:2023-09-26

我不知道如何访问树框架中的表。你能帮我吗?

 <html>
    <head>
       <script>
            alert( window.frames[1].document.getElementById('row'));
        </script>
    </head>
    <FRAMESET cols="90%, 10%" onload="start()">
      <FRAMESET rows="70%,*">
          <FRAME src="https://www.orias.fr/" id="details">
          <FRAME src="traitement.php" id="traitement">
      </FRAMESET>
      <FRAME src="pagination.php" id="pages">
    </FRAMESET>
</html>

在将一个框架添加到DOM之前,您不能访问它,在加载之前,您也不能访问框架中的文档。

您正在调用start函数onload,但尚未定义它。请定义它。

function start() {
  alert( window.frames[1].document.getElementById('row'));
}