怎么用js编写一个让一个层隐藏的函数?

来源:百度知道 编辑:UC知道 时间:2024/05/30 10:30:09
我想知道最简单的语句是什么?
最简单的方法。
调用我会。
我看这面这个有点长,感觉不是我想要的。
用display好像也行的。
用visible是不是也行呢?

只写函数怕你不会调用 给你写了个例子 自己运行看看吧
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>层隐藏的演示</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 308px;
top: 68px;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?&qu