不知道为什么
点 <input name="mail" type="text" id="mail" />就关闭请高手改一下点击不要关闭除非点<div onclick="hideDownloadPanel();" style="right:auto">关闭</div>
才关闭<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/></body>
</html>
解决方案 »
- 我提的这个问题谁知道是什么原因
- 急!!!!关于Ext4.0的Tabpanel
- 咨询一个Jquery绘图插件 HighCharts 使用的问题?
- Java 表单验证
- jquery c# 异步加载 tree ,tree 的节点全部来自 数据库,递归.首先加载一级tree 节点,当点击 一级tree 节点时,用Ajax 加载
- 什么是JavaScript跨域操作啊?
- extjs的问题。。。。。。。。。
- 这是在网上搜索到的一个页面代码,请问大家谁知道怎么把红色部分的背景色替换成图片,谢谢!
- 如何控制 type="radio" 必须选择
- 在网页上使用<SCRIPT src="xxx.js">就提示找不到对象,把xxx.js里的内容都写到网页上就没有问题!
- 如何循环判断大小
- Js可能造成了死循环? 图片一直在下载, 本地测试是没问题的
解决层在下拉列表上面!
<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>
<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(){
S('downloadPanel').innerHTML += "<iframe style='width:100%;height:300px;position:absolute;left:0px;top:0px;z-index:-1;filter:alpha(opacity = 0)'></iframe>"
}
</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="z-index:200;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>