1、使用display,此方法隐藏后不再占用位置

<script type="text/javascript">

function show()
    {
        var a = document.getElementById("add")
        
        if(a.style.display=="none")
        {
            a.style.display="";
        }
        else
        {
            a.style.display="none";
        }
        
    }

</script>
javascript

相关文章:

  • 2022-12-23
  • 2021-09-07
  • 2021-06-12
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
猜你喜欢
  • 2022-03-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-10-30
  • 2022-12-23
相关资源
相似解决方案