<!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>点击链接弹出提示层</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
html,body{font-size:12px;}
img {border:none}
a{color:#06c;text-decoration:underline;cursor:pointer;}
.pointer{cursor:pointer;}
.right{float:right}
.rightimg{margin:0 0 0 6px}
.infoba {background:#fff9e3;border:1px solid #fadc80;color:#743e04;margin-bottom:10px;padding:8px 20px 4px 20px;}
</style>
<script type="text/javascript">
function S(i) { return document.getElementById(i); }
function download( evt, fid){
var _event = evt ? evt : event;
var _target = evt ? evt.target : event.srcElement;
var _p = S( "downloadPanel" );
_p.style.top = _event.clientY + document.body.scrollTop ;
_p.style.left = ( _event.clientX + document.body.scrollLeft < 160 ? _event.clientX + document.body.scrollLeft + 10 : _event.clientX + document.body.scrollLeft - 120 );
Show( "downloadPanel" , true );
_p.focus();
}
function Show(obj, bShow) {
obj = (typeof(obj) == "string" ? S(obj) : obj);
if (obj) obj.style.display= (bShow ? "" : "none");
}
function hideDownloadPanel( evt ){
Show( "downloadPanel" ,false);
}
function checkClick(evt){
var _target = evt ? evt.target : event.srcElement ;
var _id = _target.id;
if( _id == "" ){
_id = _target.parentNode.id;
}
if( _id !="downloadDirect" && _id != "downloadAgent" && _id != "downloadPanel" && _id.indexOf( "downloadFile_" ) < 0 && _id.indexOf( "downloadLink_" ) < 0 ){
Show( "downloadPanel" , false );
}
}
window.onload = function(){
document.body.οnclick=checkClick;
}
</script>
</head>
<body>
<div id="downloadPanel" style="position:absolute;top:0px;left:0px;width:230px;z-index:999;padding:6px 2px 6px 10px;border:1px solid #fb7;display:none;" class="infobar">
<img src="/jscss/demoimg/200903/error_close.gif" class="right pointer" οnclick="hideDownloadPanel();" title="关闭" />
<div class="">友情链接:</div>
<div style="padding:10px 0 0px 0;font-size:14px;"><a id="downloadDirect" href="/">源码爱好者</a> <br /><br /><a href="/"><img src="/images/logo.gif"></a>
</div>
</div>
<a id="downloadLink_002" οnclick="download(event,'downloadLink');">网站链接</a>
</body>
</html>
点击链接弹出提示层
最新推荐文章于 2022-02-03 12:03:05 发布