为什么通过javascript发送多个打印被firefox阻止,以及如何禁用它

Why Sending multiple print by javascript is blocked with firefox and how to disable it?

本文关键字:阻止 firefox 何禁用 打印 javascript 为什么      更新时间:2023-09-26

我发送了三个打印语句。

PagePrint=window.open('xx');
PagePrint.print();
PagePrint.print();
PagePrint.print();

第一次打印成功完成,但在第二个语句中firefox阻止打印并显示此消息:(prevent this page from creating additional dialogs)。如何使用firefox configuraton或任何其他方式禁用此对话框?

尝试以下操作:

  1. 在firefox的URL栏中输入"about:config"。会弹出一个警告,但只要点击继续。
  2. 右键单击页面上的任何地方,并在弹出菜单中选择"新建->整数"。
  3. 输入"dom。在出现的对话框中设置successive_dialog_time_limit,并将其值设置为0。
  4. 按OK保存该值。

希望能让你做多个对话框