61,115
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<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.onclick=checkClick;
}
</script>
<style type="text/css">
html,body{
font-size:12px;
}
img {border:none}
a {color:#4d5d2c;text-decoration:underline;cursor:pointer;}
.pointer {cursor:pointer;}
.right {float:right}
.right img{margin:0 0 0 6px}
.infobar {background:#fff9e3;border:1px solid #fadc80;color:#743e04;margin-bottom:10px;padding:8px 20px 4px 20px;}
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div id="downloadPanel" style="position:absolute;top:0px;left:0px;width:360px;z-index:999;padding:6px 2px 6px 10px;border:1px solid #fb7;display:none;" class="infobar"><div onClick="hideDownloadPanel();" style="right:auto">关闭</div>
<div > 标题:<input name="title" type="text" id="title" /></div>
<div style="padding:6px 0 0 0;">信箱:<input name="mail" type="text" id="mail" /></div>
<div class="addrtitle" style="padding:6px 0 0 0;">内容: <textarea name="content" cols="68" rows="15" id="content"></textarea></div>
<div class="addrtitle" style="padding:6px 0 0 0;"><input type="submit" name="Submit" value="提交" /> <input type="reset" name="Submit2" value="重置" /></div>
</div>
</form>
<a id="downloadLink_001" onclick="download( event, 'downloadLink' );" >添加</a><br/>
<label>
<select name="select">
</select>
</label>
</body>
</html>