用window.open来代替弹出层
1
2
3
var newWin = null;
4
function 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
}
16
window.onfocus=function (){
17
18
if(newWin){
19
if(!newWin.closed)
20
newWin.focus();
21
}
22
};
23
24
window.document.onfocus=function (){
25
26
27
if(newWin){
28
if(!newWin.closed)
29
newWin.focus();
30
31
}
32
33
};
34
35
36
37
window.document.onclick=function (){
38
39
40
if(newWin){
41
if(!newWin.closed)
42
newWin.focus();
43
44
}
45
46
};
47
48
window.document.ondblclick=function (){
49
50
51
if(newWin){
52
if(!newWin.closed)
53
newWin.focus();
54
55
}
56
57
};
58
59
60
2

3
var newWin = null;4
function 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
}16
window.onfocus=function (){ 17

18
if(newWin){19
if(!newWin.closed)20
newWin.focus(); 21
} 22
}; 23

24
window.document.onfocus=function (){ 25

26

27
if(newWin){28
if(!newWin.closed)29
newWin.focus();30
31
} 32
33
}; 34

35
36

37
window.document.onclick=function (){ 38

39

40
if(newWin){41
if(!newWin.closed)42
newWin.focus();43
44
} 45
46
}; 47

48
window.document.ondblclick=function (){ 49

50

51
if(newWin){52
if(!newWin.closed)53
newWin.focus();54
55
} 56
57
}; 58

59
60



浙公网安备 33010602011771号