用window.open來代替彈出層
文章來源:365jz.com 點擊數(shù):
418 更新時間:2009-09-16 11:39
參與評論
1
2
3
var newWin = null;
4
function popup_page()
5

{
6
//這里新打開一個窗口,把這個窗口的屬性設(shè)置一下,不必要設(shè)置那種彈出層(我不會寫那種樣式),這個頁面的數(shù)據(jù)它的父窗口當(dāng)然也能獲得
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
如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答??! 點擊進入論壇
------分隔線----------------------------