<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ss</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{ font-size:12px; font-family:arial;}
.show{ position:relative;}
.show a { font-size:12px; color:#333; font-weight:bold;}
.hidden { width:280px; position:absolute; top:25px; left:0; background:#fff; padding:1px; border:1px solid #BDBEBD; z-index:999;}
.hidden h2 { background:#D2D9D0; font-size:12px; line-height:20px; margin:1px; padding-right:5px; text-indent:5px;}
.hidden h2 a { display:block; float:right; text-align:right;}
.hidden p{ padding:0 5px;}
</style>
</head>
<body>
<script language="javascript">
function DIVShow(i){
if( document.getElementById(i).style.display=='')
document.getElementById(i).style.display = 'none';
else
document.getElementById(i).style.display = '';
}
</script>
<div class="show" ><a href="javascript:DIVShow('hidden')" onmouseover="DIVShow('hidden')">点击这里打开隐藏层</a>
<div style="display:none;" id="hidden" class="hidden">
<h2><a onclick="javascript:document.getElementById('hidden').style.display='none';" class="red" href="#">[关闭层]</a>隐藏层</h2>
<p>这里显示的是隐藏层的内容,这里显示的是隐藏层的内容,这里显示的是隐藏层的内容,这里显示的是隐藏层的内容</p>
</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ss</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{ font-size:12px; font-family:arial;}
.show{ position:relative;}
.show a { font-size:12px; color:#333; font-weight:bold;}
.hidden { width:280px; position:absolute; top:25px; left:0; background:#fff; padding:1px; border:1px solid #BDBEBD; z-index:999;}
.hidden h2 { background:#D2D9D0; font-size:12px; line-height:20px; margin:1px; padding-right:5px; text-indent:5px;}
.hidden h2 a { display:block; float:right; text-align:right;}
.hidden p{ padding:0 5px;}
</style>
</head>
<body>
<script language="javascript">
function DIVShow(i){
if( document.getElementById(i).style.display=='')
document.getElementById(i).style.display = 'none';
else
document.getElementById(i).style.display = '';
}
</script>
<div class="show" ><a href="javascript:DIVShow('hidden')" onmouseover="DIVShow('hidden')">点击这里打开隐藏层</a>
<div style="display:none;" id="hidden" class="hidden">
<h2><a onclick="javascript:document.getElementById('hidden').style.display='none';" class="red" href="#">[关闭层]</a>隐藏层</h2>
<p>这里显示的是隐藏层的内容,这里显示的是隐藏层的内容,这里显示的是隐藏层的内容,这里显示的是隐藏层的内容</p>
</div>
</div>
</body>
</html>
解决方案 »
- js提示框请教
- 请问如何区别window.location.Reload()和window.location.href=window.location.href;
- 一网站 要在北京打开时跳转到别的页面,其他城市不跳转 求此JS代码(最好不要用到IP库)!
- 如何获得onclick里的内容
- 求助:javascript如何传递属性?
- 怎样让某个局部的页面10秒后再显示
- 不用表单,如何定时刷新本页面,并调用脚本文件?
- ●●如何实现这样这个简单的功能??解决立刻揭贴!谢谢高手!!
- 怎样在文本框中输入的时候能输入六位数字。
- 【求助】【求助大神】截取数字问题
- 求助:js外部调用无显示效果,内部可以
- 怎么把一个效果封装成插件
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ss</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{ font-size:12px; font-family:arial;}
.show{ position:relative;}
.show a { font-size:12px; color:#333; font-weight:bold;}
.hidden { width:280px; position:absolute; top:25px; left:0; background:#fff; padding:1px; border:1px solid #BDBEBD; z-index:999;}
.hidden h2 { background:#D2D9D0; font-size:12px; line-height:20px; margin:1px; padding-right:5px; text-indent:5px;}
.hidden h2 a { display:block; float:right; text-align:right;}
.hidden p{ padding:0 5px;}
</style>
</head>
<body>
<script language="javascript">
function DIVShow(i){
if( document.getElementById(i).style.display=='')
document.getElementById(i).style.display = 'none';
else
document.getElementById(i).style.display = '';
}
</script>
<div class="show" ><a href="javascript:void(0)" onmouseover="DIVShow('hidden')">点击这里打开隐藏层</a>
<div style="display:none;" id="hidden" class="hidden">
<h2><a onclick="javascript:document.getElementById('hidden').style.display='none';" class="red" href="#">[关闭层]</a>隐藏层</h2>
<p>这里显示的是隐藏层的内容,这里显示的是隐藏层的内容,这里显示的是隐藏层的内容,这里显示的是隐藏层的内容</p>
</div>
</div>
</body>
</html>