我有一个 Ajax 函数,它返回一个 html 字符串作为 vReportContent。
然后我使用 javascript window.open 打开一个新的 html 页面
此页面上有一个名为“divReportContent”的 div,我想用 vReportContent 进行更新
这是 javascript/jquery 代码示例:
var vReportContent = msg; (returned from Jquery Ajax call - this works fine)
var vUrl = 'PrintReport.html';
var vWindowName = 'PrintReport';
window.open('' + vUrl + '', '' + vWindowName + '', width=1010, height=750;
*使用 vReportContent 更新子(打开的)窗口 div
类似于: $('#divReportContent').html(vReportContent);
或等效的javascript。
谢谢!