问题打印弹出页面。 [英] Problem printing popup pages.

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

问题描述

大家好,


我使用''var openWindow = window.open(" new"," pop")''创建了一个弹出页面。


使用openWindow.document.write("")添加内容;声明。但是现在

我希望能够打印这个页面吗?


openWindow.document.write("< a href =''#' '

onClick =''self.close()''>关闭< \ / a>< \ / p>")


这将关闭页面,但下面的这些行只打印父页面而不是弹出子窗口。


openWindow.document.write("< a href =''#''

onClick =''self.print()''>打印< \ / a>< \ / p>")

openWindow.document.write("< a href =''#''

onClick =''window.print()''> Print< \ / a> < \ / p>")

我也一直在尝试编写一个基于document.lastChild的函数:


popupPrint( )


var popUp = document.lastChild;

popUp.print();

}


但是什么都没有用?


任何帮助预测我使用IE5.5如果这个有效吗?


问候


gb

Hi All,

Ive created a popup page using ''var openWindow = window.open("new","pop")''

And added content using openWindow.document.write(" "); statements. But now
I would like to be able to print this page?

openWindow.document.write("<a href=''#''
onClick=''self.close()''>Close<\/a><\/p>")

This closes the page but these lines below only print the parent page not
the popup child window.

openWindow.document.write("<a href=''#''
onClick=''self.print()''>Print<\/a><\/p>")
openWindow.document.write("<a href=''#''
onClick=''window.print()''>Print<\/a><\/p>")

Ive also been trying to write a function based on document.lastChild:

popupPrint()

var popUp = document.lastChild;
popUp.print();
}

But nothing works?

Any help appressiated i''m using IE5.5 if this has an effect?

Regards

gb

推荐答案

gb hu kiteb:
gb hu kiteb:
大家好,
我已经使用''var openWindow =
window.open(new创建了一个弹出页面;,pop)''

使用openWindow.document.write添加内容(" ");声明。
但是现在我希望能够打印这个页面吗?
Hi All,

Ive created a popup page using ''var openWindow =
window.open("new","pop")''

And added content using openWindow.document.write(" "); statements.
But now I would like to be able to print this page?




为什么你甚至认为查看你网页的机器有一个

连接打印机?

-

-

Fabian

访问我的网站经常长期使用!
http://www.lajzar.co.uk



Why do you even assume that the machine viewing your web page has a
printer attached?
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk


< a href =" javascript :onClick = window.print()"> print< ; / A>应该工作。


问候

Lee


" gb" < gb@tinyworld.co.uk>在留言中写道

news:3f ******** @ mk-nntp-2.news.uk.tiscali.com ...
<a href="javascript:onClick=window.print()">print</a> should work.

Regards
Lee

"gb" <gb@tinyworld.co.uk> wrote in message
news:3f********@mk-nntp-2.news.uk.tiscali.com...
大家好,

我已经使用''var openWindow =
window.open(" new"," pop")''创建了一个弹出页面。
并使用openWindow.document添加内容.write("");声明。但是
现在我希望能够打印这个页面吗?

openWindow.document.write("< a href =''#''
onClick =' 'self.close()''>关闭< \ / a>< \ / p>")

这会关闭页面,但下面的这些行只打印父页面而不是<弹出子窗口。

openWindow.document.write("< a href =''#''
onClick =''self.print()''> ;打印< \ / a>< \ / p>")
openWindow.document.write("< a href =''#''
onClick =''窗口。 print()''>打印< \ / a>< \ / p>")
我一直在尝试编写基于document.lastChild的函数:

popupPrint()

var popUp = document.lastChild;
popUp.print();
}

但没有任何作用?

如果这有效果,我会使用IE5.5吗?



gb
Hi All,

Ive created a popup page using ''var openWindow = window.open("new","pop")''
And added content using openWindow.document.write(" "); statements. But now I would like to be able to print this page?

openWindow.document.write("<a href=''#''
onClick=''self.close()''>Close<\/a><\/p>")

This closes the page but these lines below only print the parent page not
the popup child window.

openWindow.document.write("<a href=''#''
onClick=''self.print()''>Print<\/a><\/p>")
openWindow.document.write("<a href=''#''
onClick=''window.print()''>Print<\/a><\/p>")

Ive also been trying to write a function based on document.lastChild:

popupPrint()

var popUp = document.lastChild;
popUp.print();
}

But nothing works?

Any help appressiated i''m using IE5.5 if this has an effect?

Regards

gb



嗯,没想到这是公平的... 3 x三个措辞的理由:


用户增强的体验

可用性和辅助功能

以人为本的界面...


应该总是假设一个人已经连接了外围设备并设计为

封面..一台打印机是最基本和普通的。


问候


Lee

Fabian < LA **** @ hotmail.com>在消息中写道

news:bp ************* @ ID-174912.news.uni-berlin.de ...
Hmmm, didn''t think that was fair... 3 x three worded reasons:

User enhanced experience
Useability and accessibility
Human Centered Interfaces...

Should always assume that a person has peripherals attached and design to
cover... a printer being the most basic and common.

Regards

Lee
"Fabian" <la****@hotmail.com> wrote in message
news:bp*************@ID-174912.news.uni-berlin.de...
gb hu kiteb:
gb hu kiteb:
大家好,
我已经使用''var openWindow =
window.open(" new")创建了一个弹出页面。 ,pop,

使用openWindow.document.write("")添加内容;声明。
但是现在我希望能够打印这个页面吗?
Hi All,

Ive created a popup page using ''var openWindow =
window.open("new","pop")''

And added content using openWindow.document.write(" "); statements.
But now I would like to be able to print this page?



为什么你甚至认为查看你网页的机器有一台
打印机附上?

-
-
Fabian
经常长时间访问我的网站!
http://www.lajzar.co.uk



这篇关于问题打印弹出页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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