500分求一个特效代码,打开新浪首页之后,顶端会弹出一个大约占1/2屏幕大小的广告,然后过几秒钟广告就逐渐隐藏了这个该怎么做
解决方案 »
- https Post xml 发送xml和接收xml
- .net 判断当前页面是否为弹出窗口
- 如何判断客户端是否已经安装framework?
- Log4net的使用 急。。。在线等
- 在DataGrid挷定时如何设置不同的颜色
- asp.net中实现点击一个按钮出现选择文件对话框
- 帮助文档开源程序谁给推荐个。
- 一个很迷惑的问题,高手请指教啊!!
- WebForm无法调试,错误如下,环境是windows2003+Visual Studio 2003,请问哪位高手能帮我解决,谢谢
- asp.net能否访问本地的资源?
- 请问哪有较新版的C#.NET应用实例下载?顺便散100分
- 请问在CS代码中执行 <script>confirm('" + strMsgBox + "') </script> 的返回值是什么?
=========
setTimeout(window.close(),3000)
=========
setTimeout(window.close(),3000)
这个ok?
<div id=fullscreenad style="display:none"> </div>
</center>
<Script language="Javascript" src="adm.js"></Script>
<script language="javascript" for="ADAREAlmt" event="fscommand(command,args)">
if(document.all) this.style.display="none";
</script>
<Script language="Javascript">
AD = new ADM("FULL",1);
AD.StartTime = new Array("2008/9/13 00:00");
AD.EndTime = new Array("2008/10/20 00:00");
AD.src = new Array("ad.gif");
AD.href = new Array("http://www.xxx.com/adhref.htm");
AddSchedule(AD);
</script>
-------------------------
那个adm.js太长了,要的话mail吧:[[email protected]][/email]
setTimeout(window.close(),3000)
以下提供下思路:
用div来作容器,将广告放入div,在开始的时候,div的display:none;height:1px;即隐藏.
在page onload时间里面,将div的height高度用一定步长增加(setInterval()来做这件事).
当达到一定高度之后,停止.之后,等待关闭(不关闭也可以)。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>像163网站顶部展出的大幅广告</title>
<script type="text/javascript" language="javascript">
var time = 500;
var h = 0;
function addCount()
{
if(time>0)
{
time--;
h = h+5;
}
else
{
return;
}
if(h>260) //高度
{
return;
}
document.getElementById("ads").style.display = "";
document.getElementById("ads").style.height = h+"px";
setTimeout("addCount()",30);
}
window.onload = function showAds()
{
addCount();
setTimeout("noneAds()",4000); //停留时间自己适当调整
}
</script>
<script type="text/javascript" language="javascript">
var T = 260;
var N = 260; //高度
function noneAds()
{
if(T>0)
{
T--;
N = N-5;
}
else
{
return;
}
if(N<0)
{
document.getElementById("ads").style.display = "none";
return;
}
document.getElementById("ads").style.height = N+"px";
setTimeout("noneAds()",30);
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #999999;
line-height:20px}
.STYLE1 {
font-size: 24px;
font-weight: bold;
color: #FF0000;
}
.STYLE2 {
font-size: 16px;
font-weight: bold;
color: #3333CC;
}
-->
</style></head>
<body>
<div id="ads" style="margin:auto; display:none; width:900px; top:0px; height:0px; border:solid 1px #000; background-color:#fafafa; overflow:hidden; text-align:center;">
<td width="900" height="280"><a href="http://www.chinaz.com"><img src="http://220.189.240.168:8090/images/site.jpg" border="0" alt="中国站长站"></a></td>
</div>
<div style="margin:auto; width:900px; height:200px; border:solid 1px #000; background-color:#fafafa; text-align:center;">
<div align="left"><br>
<span class="STYLE1"></span><br>
<span class="STYLE2"> </span><br>
</div>
</div>
</body>
</html>
我在你另外一篇帖子上也发了
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery 插件 plugin 消息插件--亮亮的博客</title>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document.body).prepend('<div id="ad" style=" width:1024px; height:768px; display:none;"><img src="1.jpg" width="1024" height="768" /></div>');
if(!$('#ad').is('div')){ return; }
$('#ad').slideDown(1000);
setTimeout("closeAd()",4000);
});
function closeAd()
{
if(!$('#ad').is('div')){ return; }
$('#ad').slideUp(1000);
setTimeout("$('#ad').remove();",1000);
}
</script>
<style type="text/css">
<!--
*{ margin:0; border:0; padding:0;}
-->
</style>
</head><body>
</body>
</html>