惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
WordPress大学
WordPress大学
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
L
LangChain Blog
雷峰网
雷峰网
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
NISL@THU
NISL@THU
Scott Helme
Scott Helme
量子位
S
Security Affairs
T
Threat Research - Cisco Blogs
博客园_首页
云风的 BLOG
云风的 BLOG
D
Docker
AWS News Blog
AWS News Blog
腾讯CDC
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
U
Unit 42
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Last Watchdog
The Last Watchdog
C
Cybersecurity and Infrastructure Security Agency CISA
IT之家
IT之家
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
F
Full Disclosure
L
Lohrmann on Cybersecurity
The Hacker News
The Hacker News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Y
Y Combinator Blog
S
Security @ Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
I
InfoQ

博客园 - 嚣张的沉默

读写txt文档 限制TextBox输入字数 计算TextBox输入的字数 我常用的正则与SQL语句 DataSet导入到Excel 年月日联动的JS代码 用户控件的传值方法 Repeater模板列 asp.net的几个小技巧 百叶窗效果 建站安全 倒计时代码 解决SQL2000安装服务器挂起 删除.NET的最近项目 DataSet写入、导出XML 上传图片重命名并创建文件夹 自动跳转页面带参数 微软出的AJAX控件的安装(转载) 第一次开博
屏幕右下角弹出广告
嚣张的沉默 · 2007-11-27 · via 博客园 - 嚣张的沉默

把以下代码存在一个js里

window.onload = getMsg;
window.onresize 
= resizeDiv;
window.onerror 
= function(){}
//短信提示使用(FHB添加)
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop 
= parseInt(document.getElementById("eMeng").style.top,10)
divLeft 
= parseInt(document.getElementById("eMeng").style.left,10)
divHeight 
= parseInt(document.getElementById("eMeng").offsetHeight,10)
divWidth 
= parseInt(document.getElementById("eMeng").offsetWidth,10)
docWidth 
= document.body.clientWidth;
docHeight 
= document.body.clientHeight;
document.getElementById(
"eMeng").style.top = parseInt(document.body.scrollTop,10+ docHeight + 10;//   divHeight
document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10+ docWidth - divWidth
document.getElementById(
"eMeng").style.visibility="visible"
objTimer 
= window.setInterval("moveDiv()",10)
}

catch(e){}
}

function resizeDiv()
{
i
+=1
//if(i>300) closeDiv() //想不用自动消失由用户来自己关闭就屏蔽这句
try{
divHeight 
= parseInt(document.getElementById("eMeng").offsetHeight,10)
divWidth 
= parseInt(document.getElementById("eMeng").offsetWidth,10)
docWidth 
= document.body.clientWidth;
docHeight 
= document.body.clientHeight;
document.getElementById(
"eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
document.getElementById(
"eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
}

catch(e){}
}

function moveDiv()
{
try
{
if(parseInt(document.getElementById("eMeng").style.top,10<= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer 
= window.setInterval("resizeDiv()",1)
}

divTop 
= parseInt(document.getElementById("eMeng").style.top,10)
document.getElementById(
"eMeng").style.top = divTop - 1
}

catch(e){}
}

function closeDiv()
{
document.getElementById('eMeng').style.visibility
='hidden';
if(objTimer) window.clearInterval(objTimer)
}

在需要弹出广告的页面加入如下代码:

<div id="eMeng" style="border-right: #455690 1px solid; border-top: #a6b4cf 1px solid;
            z-index: 99999; left: 0px; visibility: hidden; border-left: #a6b4cf 1px solid;
            width: 180px; border-bottom: #455690 1px solid; position: absolute; top: 0px;
            height: 116px; background-color: #c9d3f3"
>
            
<table style="border-top: #ffffff 1px solid; border-left: #ffffff 1px solid" cellspacing="0"
                cellpadding
="0" width="100%" bgcolor="#AFDCF3" border="0">
                
<tbody>
                    
<tr bgcolor="#6699cc">
                        
<td valign="center" width="100%" style="vertical-align: middle; height: 24px; background-color: #ff0066; text-align: center">
                            **网提示:
</td>
                        
<td style="background-image: url('msgTopBg.gif'); padding-right: 2px; padding-top: 2px; height: 24px;"
                            valign
="center" align="right" width="19">
                            
<span title="关闭"  onclick="closeDiv()">×</span><!--<IMG title=关闭 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg">--></td>
                    
</tr>
                    
<tr>
                        
<td style="background-image: url('/UploadFiles/200510822587734.jpg'); padding-right: 1px;
                            padding-bottom: 1px; width: 183px;"
 colspan="3" height="90">
                            
<div style="border-right: #b9c9ef 1px solid; padding-right: 13px; border-top: #728eb8 1px solid;
                                padding-left: 13px; font-size: 12px; padding-bottom: 13px; border-left: #728eb8 1px solid;
                                width: 100%; color: #1f336b; padding-top: 18px; border-bottom: #b9c9ef 1px solid;
                                height: 100%"
>
                                **
<br>
                                
<br>
                                
<div align="center" style="word-break: break-all">
                                    
<href="#" target="_blank"><font color="#FF0000">进入**论坛</font></a></div>
                            
</div>
                        
</td>
                    
</tr>
                
</tbody>
            
</table>
        
</div>

在<head></head>中调用JS文件