用window.open来代替弹出层
文章来源:365jz.com 点击数:
407 更新时间:2009-09-16 11:39
参与评论
1
2
3var newWin = null;
4function popup_page()
5{
6 //这里新打开一个窗口,把这个窗口的属性设置一下,不必要设置那种弹出层(我不会写那种样式),这个页面的数据它的父窗口当然也能获得
7 newWin = window.open ('WriteEmail.aspx', 'newwindow', 'height=550, width=800, top=60, left=120, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=yes')
8 if(newWin)
9 {
10 if(!newWin.closed)
11 {
12 newWin.focus();
13 }
14 }
15}
16window.onfocus=function (){
17
18 if(newWin){
19 if(!newWin.closed)
20 newWin.focus();
21 }
22};
23
24window.document.onfocus=function (){
25
26
27 if(newWin){
28 if(!newWin.closed)
29 newWin.focus();
30
31 }
32
33};
34
35
36
37window.document.onclick=function (){
38
39
40 if(newWin){
41 if(!newWin.closed)
42 newWin.focus();
43
44 }
45
46};
47
48window.document.ondblclick=function (){
49
50
51 if(newWin){
52 if(!newWin.closed)
53 newWin.focus();
54
55 }
56
57};
58
59
60
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
------分隔线----------------------------