关于弹出式信息显示块该怎样制作?

zhb990 2004-08-25 09:21:04
现在有许多大型网站在打开其网页后,当有重要新闻时会在右下方不定时地弹出一个小的页面来简单介绍新闻的内容,我想请问大家这个效果该怎样制作啊?
...全文
77 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
aspczlover 2004-08-25
  • 打赏
  • 举报
回复
main.asp

<%
imptyped=3 'imptyped可以是实时从数据库读出的信息
if imptyped=3 then
Response.Write "<script>window.open ('new.asp?id=3', 'newwindow', 'height=100, width=200, left=600, top=400, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')</script>"
end if
%>

new.asp

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<script language="JavaScript">
function closeit() {
setTimeout("self.close()",5000) //毫秒
}

</script>
<%
id=request.querystring("id")
'从数据库读取信息
%>
<body onload="closeit()" bgcolor="#00CC99">

<p align="center">重要消息</p>
<p align="center">三米板夺冠</p>

</body>

</html>
butcher2002 2004-08-25
  • 打赏
  • 举报
回复
close前最好先~window.opener=null;

:)~
aspczlover 2004-08-25
  • 打赏
  • 举报
回复
这个是窗口定时关闭
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language="JavaScript">
function closeit() {
setTimeout("self.close()",5000) //毫秒
}
</script>
<body onload="closeit()">

</body>

</html>
aspczlover 2004-08-25
  • 打赏
  • 举报
回复
window.open
miqier 2004-08-25
  • 打赏
  • 举报
回复
你看哪个网站有就去他那儿看看他的代码不就得了。

28,404

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧