反正我可以在jQuery的通过表从一个网页到另一个弹出页面 [英] Anyway that I can pass a table from one page to another pop-up page in jquery
问题描述
有谁知道我是否可以通过将表从一个网页到另一个弹出页面的按钮被点击的时候?
Does anyone know whether i can pass a table from a page to another pop-up page when the button been clicked?
例: 在页面A,我有以下的code:
Example: In page A, I have the following code :
<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>
当我点击下面的JavaScript,新的页面会弹出,它会通过在同一个表和信息:
when I clicked on the following javascript, new page will pop-up and it will passing the same table and information over:
window.open("pgTest.aspx");
难道有谁知道是否有可能发生在jQuery的,javasctip或AJAX?
Do anyone know whether it's possible happen in jquery, javasctip or ajax?
推荐答案
您可以调用使用opener.functionName父窗口的函数和您可以访问表中的父窗口。
You can call a function in the parent window using opener.functionName and in that you can access the table in the parent window.
有关详细信息请参阅 window.opener
For more details read window.opener
在父(揭幕战)窗口的
In your parent (opener) window
<table id="table1">
....
</table>
function getTable() {
var tableObj = document.getElementById("table1");
return tableObj;
}
在你的子窗口的
In your child window
opener.getTable();
这篇关于反正我可以在jQuery的通过表从一个网页到另一个弹出页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!