athlon
只弹出一次的公告效果
调用弹出页面代码main.htm:
1
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>
2
<
html
>
3
<
head
>
4
<
meta
http-equiv
="Content-Type"
content
="text/html; charset=GB2312"
>
5
<
link
href
="../style/piccm_style.css"
rel
="stylesheet"
type
="text/css"
>
6
<
title
>
7
演示
8
</
title
>
9
<
script
language
="JavaScript"
type
="text/JavaScript"
>
10
<!--
11
function
openwindow()
12
{
13
window.open('left.html','Download','top
=
'
+
(screen.height
-
115
)
/
2
+
',left
=
'
+
(screen.width
-
325
)
/
2
+
',width
=
325
,height
=
115
,toolbar
=
no, menubar
=
no, scrollbars
=
no, resizable
=
no,location
=
no, status
=
no','
false
');
14
}
15
16
17
function
get_cookie(Name)
{
18
var
search
=
Name
+
"
=
"
19
var
returnvalue
=
""
;
20
if
(document.cookie.length
>
0
)
{offset
=
document.cookie.indexOf(search)
21
if
(offset
!=
-
1
)
{offset
+=
search.length;end
=
document.cookie.indexOf(
"
;
"
, offset);
22
if
(end
==
-
1
)end
=
document.cookie.length;returnvalue
=
unescape(document.cookie.substring(offset, end))}
23
}
24
return
returnvalue;
25
}
26
function
ad()
{
27
alert(window.opener);
28
if
(get_cookie('exist')
==
'')
{
29
openwindow();
//
调用window.open;
30
}
31
else
{
32
alert(
"
不弹出窗口
"
);
33
}
34
}
35
</
script
>
36
37
</
head
>
38
39
40
<
body
>
41
<
script
>
42
ad();
43
</
script
>
44
</
body
>
45
</
html
>
46
弹出页面left.html
<
html
>
<
head
>
<
meta
http-equiv
="Content-Type"
content
="text/html; charsGB2312312"
>
<
title
>
Insert title here
</
title
>
</
head
>
<
body
>
<
script
>
document.cookie
=
"
exist=yes
"
;
window.onunload
=
function
()
{
var
date
=
new
Date();
document.cookie
=
"
exist = ; expires=
"
+
date.toGMTString();
}
;
</
script
>
<
table
width
="100%"
height
="10%"
border
="0"
cellpadding
="0"
cellspacing
="0"
>
<
br
>
<
br
>
<
tr
>
<
td
valign
="top"
>
<
input
type
="text"
name
="ulfile"
size
="40"
>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
body
>
</
html
>
posted on 2007-07-11 09:23
书上有
阅读(28)
评论(0)
编辑
收藏
新用户注册
刷新评论列表
只有注册用户
登录
后才能发表评论。
网站导航:
博客园
IT新闻
Chat2DB
C++博客
博问
管理
<
2025年7月
>
日
一
二
三
四
五
六
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
导航
BlogJava
首页
新随笔
联系
聚合
管理
统计
随笔 - 0
文章 - 1
评论 - 0
引用 - 0
留言簿
给我留言
查看公开留言
查看私人留言
文章档案
2007年7月 (1)
搜索
最新评论
Powered by:
BlogJava
Copyright © 书上有