14 个解决方案
#1
d
#2
期待!
#3
谢谢帮顶,高手出来解答啊
#4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function hiddenDiv(p){
var divobj = document.getElementById("div1");
//alert(divobj.style.display);
var divs = divobj.children;
for(var i=0;i<divs.length;i++){
var div = divs[i];
if(div.tagName == 'DIV'){
if(p==1)div.style.display = 'none';
else div.style.display = '';
}
}
}
function hiddenDivs(){
setTimeout("hiddenDiv(1)",3000);
}
//-->
</SCRIPT>
<style>
div{
background-color:cornflowerblue;
width:60px;
}
</style>
</HEAD>
<BODY onload="hiddenDivs()">
<div id="div1" onmouseover="hiddenDiv(0)" onmouseout="hiddenDivs(1)">
文件
<div>
新建
</div>
<div>
保存
</div>
</div>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function hiddenDiv(p){
var divobj = document.getElementById("div1");
//alert(divobj.style.display);
var divs = divobj.children;
for(var i=0;i<divs.length;i++){
var div = divs[i];
if(div.tagName == 'DIV'){
if(p==1)div.style.display = 'none';
else div.style.display = '';
}
}
}
function hiddenDivs(){
setTimeout("hiddenDiv(1)",3000);
}
//-->
</SCRIPT>
<style>
div{
background-color:cornflowerblue;
width:60px;
}
</style>
</HEAD>
<BODY onload="hiddenDivs()">
<div id="div1" onmouseover="hiddenDiv(0)" onmouseout="hiddenDivs(1)">
文件
<div>
新建
</div>
<div>
保存
</div>
</div>
</BODY>
</HTML>
#5
http://hi.baidu.com/wqnljy/blog/item/6cf2331dfe6d34c2a6866914.html
结合
http://hi.baidu.com/wqnljy/blog/item/e08d4a62183a56d48cb10d3f.html
自己改改
结合
http://hi.baidu.com/wqnljy/blog/item/e08d4a62183a56d48cb10d3f.html
自己改改
#6
#7
你看看这里人的头像,是你想要的功能吗?
#8
跟4楼演示的基本一致,不过就是4楼的稍微糙点,呵呵。如果隐藏和显示的时候在做些效果就好了,谢谢大家,继续顶
#9
<style>
#divbox{
border:5px solid #0066cc;
background:skyblue;
padding:20px;
font-size:22px;
color:white;
}
</style>
<script language="javascript">
function codefans(){
var box=document.getElementById("divbox");
box.style.display="none";
}
setTimeout("codefans()",3000);//3秒
</script>
<body>
<div id="divbox"><h1 align="center">3秒后隐藏</h1>
</div>
</body>
#10
常见的计时程序
#11
支持9楼的程序思路和代码风格
#12
setTimeout
#13
可以的。。。
#1
d
#2
期待!
#3
谢谢帮顶,高手出来解答啊
#4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function hiddenDiv(p){
var divobj = document.getElementById("div1");
//alert(divobj.style.display);
var divs = divobj.children;
for(var i=0;i<divs.length;i++){
var div = divs[i];
if(div.tagName == 'DIV'){
if(p==1)div.style.display = 'none';
else div.style.display = '';
}
}
}
function hiddenDivs(){
setTimeout("hiddenDiv(1)",3000);
}
//-->
</SCRIPT>
<style>
div{
background-color:cornflowerblue;
width:60px;
}
</style>
</HEAD>
<BODY onload="hiddenDivs()">
<div id="div1" onmouseover="hiddenDiv(0)" onmouseout="hiddenDivs(1)">
文件
<div>
新建
</div>
<div>
保存
</div>
</div>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function hiddenDiv(p){
var divobj = document.getElementById("div1");
//alert(divobj.style.display);
var divs = divobj.children;
for(var i=0;i<divs.length;i++){
var div = divs[i];
if(div.tagName == 'DIV'){
if(p==1)div.style.display = 'none';
else div.style.display = '';
}
}
}
function hiddenDivs(){
setTimeout("hiddenDiv(1)",3000);
}
//-->
</SCRIPT>
<style>
div{
background-color:cornflowerblue;
width:60px;
}
</style>
</HEAD>
<BODY onload="hiddenDivs()">
<div id="div1" onmouseover="hiddenDiv(0)" onmouseout="hiddenDivs(1)">
文件
<div>
新建
</div>
<div>
保存
</div>
</div>
</BODY>
</HTML>
#5
http://hi.baidu.com/wqnljy/blog/item/6cf2331dfe6d34c2a6866914.html
结合
http://hi.baidu.com/wqnljy/blog/item/e08d4a62183a56d48cb10d3f.html
自己改改
结合
http://hi.baidu.com/wqnljy/blog/item/e08d4a62183a56d48cb10d3f.html
自己改改
#6
http://hi.baidu.com/wqnljy/blog/item/6cf2331dfe6d34c2a6866914.html
结合
http://hi.baidu.com/wqnljy/blog/item/e08d4a62183a56d48cb10d3f.html
自己改改
结合
http://hi.baidu.com/wqnljy/blog/item/e08d4a62183a56d48cb10d3f.html
自己改改
#7
你看看这里人的头像,是你想要的功能吗?
#8
跟4楼演示的基本一致,不过就是4楼的稍微糙点,呵呵。如果隐藏和显示的时候在做些效果就好了,谢谢大家,继续顶
#9
<style>
#divbox{
border:5px solid #0066cc;
background:skyblue;
padding:20px;
font-size:22px;
color:white;
}
</style>
<script language="javascript">
function codefans(){
var box=document.getElementById("divbox");
box.style.display="none";
}
setTimeout("codefans()",3000);//3秒
</script>
<body>
<div id="divbox"><h1 align="center">3秒后隐藏</h1>
</div>
</body>
#10
常见的计时程序
#11
支持9楼的程序思路和代码风格
#12
setTimeout
#13
可以的。。。
#14
这里面的 有个 好不错
js 源码