<!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=utf-8" />
<title>无标题文档</title>
<script language="javascript"  type="text/javascript">
var flag=0;
function $(id)
{
    
return document.getElementById(id);
    }
function controlDIV()
{
    
if(flag==0)
    {
        $(
"my").style.visibility="hidden";
        $(
"bt_display").value="显示";
        flag
=1;
    }
    
else
    {
        $(
"my").style.visibility="";
        $(
"bt_display").value="隐藏";
        flag
=0;    
    }
    }
</script>
</head>

<body>

<input type="button" id="bt_display" value="隐藏" onclick="controlDIV()"/>
<div id="my">
<input type="text" value="my DIV"/>
</div>
</body>
</html>

相关文章:

  • 2021-12-18
  • 2021-12-18
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2021-12-18
  • 2021-12-18
  • 2021-12-18
  • 2021-11-05
  • 2021-07-28
相关资源
相似解决方案