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

推荐订阅源

P
Privacy & Cybersecurity Law Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
V
V2EX
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - Franky
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
博客园 - 司徒正美
雷峰网
雷峰网
F
Full Disclosure
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
M
MIT News - Artificial intelligence
V
Visual Studio Blog
H
Help Net Security
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
博客园_首页
O
OpenAI News
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Attack and Defense Labs
Attack and Defense Labs
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
罗磊的独立博客
P
Palo Alto Networks Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
S
Security @ Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
AWS News Blog
AWS News Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 最新话题
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threat Research - Cisco Blogs

博客园 - 嚣张的沉默

读写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文件