JScript-打印对话框 [英] JScript - Print Dialog

查看:107
本文介绍了JScript-打印对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的dot net应用程序在Web控件上显示一个HTML页面.
html页面中嵌入了一个javascript.
html页面上有按钮.

单击html按钮时,Java脚本使用JScript的Window.print().
挂起打印对话框.
还有其他一些应用程序(监视器种类)可以关闭点网窗口.由于Dot net窗口中的控件托管Html,因此html也已卸载.

问题:
仍显示由JScript Window.print()调用启动的打印对话框. 如何使用JScript关闭打印对话框?
在此先感谢:doh:

My dot net application displays a Html page on a web control.
The html page has a javascript embedded in it.
The html page has button on it.

When the html button is clicked, Java script lanches a print dialog using JScript''s Window.print().

There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded.

Problem:
The print dialog launched by the JScript Window.print() call still displayed. How do I close the print dialog using the JScript?
Thanks in Advance :doh:

推荐答案

尝试一下:
Try this:
window.print();
window.close();


您在这里:

http://embarcaderos.net/2009 /06/17/how-to-print-and-close-the-print-dialog-from-javascript/ [
Here you go:

http://embarcaderos.net/2009/06/17/how-to-print-and-close-the-print-dialog-from-javascript/[^]


这篇关于JScript-打印对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆