Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/465.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 无论如何,我可以在jquery中将表从一个页面传递到另一个弹出页面_Javascript_Jquery_Ajax - Fatal编程技术网

Javascript 无论如何,我可以在jquery中将表从一个页面传递到另一个弹出页面

Javascript 无论如何,我可以在jquery中将表从一个页面传递到另一个弹出页面,javascript,jquery,ajax,Javascript,Jquery,Ajax,有人知道我是否可以在单击按钮时将表格从一个页面传递到另一个弹出页面吗 例如: 在A页中,我有以下代码: <table> <tr> <td>Name</td> <td>Age</td> </tr> <tr> <td>Alan</td> <td>12</td> </tr> <tr>

有人知道我是否可以在单击按钮时将表格从一个页面传递到另一个弹出页面吗

例如: 在A页中,我有以下代码:

<table>
  <tr>
    <td>Name</td>
    <td>Age</td>
  </tr>
  <tr>
    <td>Alan</td>
    <td>12</td>
  </tr>
  <tr>
    <td>Amy</td>
    <td>13</td>
  </tr>
</table>

有人知道这在jquery、javasctip或ajax中是否可能发生吗?

您可以使用opener.functionName在父窗口中调用函数,这样您就可以访问父窗口中的表

有关更多详细信息,请阅读

在家长(开场白)窗口中


当您打开一个新窗口时,您可以编写任何您想要的内容,因此您可以执行以下操作:

myNewWindow.document.write('<html><title></title>' + someElement.innerHTML + '</html>');
myNewWindow.document.close(); 
myNewWindow.document.write(“”+someElement.innerHTML+“”);
myNewWindow.document.close();
<table id="table1">
    ....
</table>

function getTable() {
    var tableObj = document.getElementById("table1");
    return tableObj;
}
opener.getTable();
myNewWindow.document.write('<html><title></title>' + someElement.innerHTML + '</html>');
myNewWindow.document.close();