执行onclick函数但仅在新窗口内解析的javascript代码

执行onclick函数但仅在新窗口内解析的javascript代码,javascript,jquery,Javascript,Jquery,有可能吗。。要使用我的javascript,示例如下所示;只需继续执行我的点击功能,但更改仅在新窗口中反映-而当前页面(非新窗口不会通过JS更改)是否可能 $('.download-pdf').click(function() { $(this).attr('target', '_blank'); notChecked = $("input[type=checkbox]:not(:checked)").parent(); notChecked.hide();

有可能吗。。要使用我的javascript,示例如下所示;只需继续执行我的点击功能,但更改仅在新窗口中反映-而当前页面(非新窗口不会通过JS更改)是否可能

   $('.download-pdf').click(function() {

   $(this).attr('target', '_blank');

    notChecked = $("input[type=checkbox]:not(:checked)").parent();
    notChecked.hide();
    yesChecked = $("input[type=checkbox]:checked").parent();

    $.each(yesChecked, function( index, el ) {
      $(el).show().html(texts[$(el).attr('id')]);
    });

您可以使用中完美描述的
postMessage
API。只有在新窗口具有相同原点的情况下,才能执行此操作


您可能需要等待一段时间才能完全加载新框架。

您希望单击在尚未加载的页面中进行更改吗?是的,正是这样。好吧,我真的希望点击只解决动态生成的pdf中的更改,它是由ie生成的。但由于我找不到解决方案,这就是我要提出的黑客。