如何使用javascript在ASP中打印其他页面内容 [英] How to print other page content in ASP using javascript

查看:71
本文介绍了如何使用javascript在ASP中打印其他页面内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我想用main.aspx上的按钮打印print.aspx窗口我该怎么做?我尝试ff脚本:



我尝试过:



function printExternal(print.aspx){

var printWindow = window.open(url,'Print','left = 200,top = 200,width = 950,height = 500,toolbar = 0, resizable = 0');

printWindow.addEventListener('load',function(){

printWindow.print();

printWindow。 close();

},true);

}

Hello guys i want to print "print.aspx" window using my button on my "main.aspx" how will i do this ? i try the ff script:

What I have tried:

function printExternal(print.aspx) {
var printWindow = window.open( url, 'Print', 'left=200, top=200, width=950, height=500, toolbar=0, resizable=0');
printWindow.addEventListener('load', function(){
printWindow.print();
printWindow.close();
}, true);
}

推荐答案

如评论中所述,你能够使它工作。
As mentioned in the comments, you were able to get it working.


这篇关于如何使用javascript在ASP中打印其他页面内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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