开发者

Sending a window toback with JavaScript

开发者 https://www.devze.com 2023-01-27 15:15 出处:网络
I have a program that creates a report from a parent window viewed in a browser.The report is displayed in a second window.When I create the report in javascript, the report window appears behind the

I have a program that creates a report from a parent window viewed in a browser. The report is displayed in a second window. When I create the report in javascript, the report window appears behind the parent window. I've tried giving the report window the focus specifying the body tag as follows:

body onload='self.focus()';>

I've also tried blurring the pa开发者_StackOverflow中文版rent window (and doing both techniques in combination). But what happens is the parent window stays on top, and the report window appears behind it. Is there some way to bring the report window to the front after it is generated from the parent?

Thank you.


try to change

body onload='self.focus()';>

to

body onload='self.focus();'>

also just like RoToRa said, How do you create your child window?

0

精彩评论

暂无评论...
验证码 换一张
取 消