当前位置: 代码迷 >> JavaScript >> 简单的有关问题`
  详细解决方案

简单的有关问题`

热度:456   发布时间:2012-02-05 12:07:14.0
简单的问题```
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "   />
<title> 1秒消失 </title>
<script   language= "javascript ">
function   he(o)
{
setTimeout( "jin( "+o+ ") ",1000)
}
function   jin(o)
{
o.style.display= "none ";
}
</script>
</head>
<body>
<div     onclick= "he(this) "> dsf </div>
</body>
</html>

我想点   字后   1秒种消失       为什么没用啊``

------解决方案--------------------
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 1 </title>
<script language= "javascript ">
var obj;
function he(o)
{
obj=o;
setTimeout( "jin() ",1000)
}
function jin()
{
obj.style.display= "none ";
}
</script>
</head>
<body>
<div onclick= "he(this) "> dsf </div>
</body>
</html>
------解决方案--------------------
function he(o)
{
window.o=o
setTimeout( "jin(o) ",1000)
}
  相关解决方案