Hiding a button in Javascript

前端 未结 9 1312
终归单人心
终归单人心 2020-11-29 05:20

In my latest program, there is a button that displays some input popup boxes when clicked. After these boxes go away, how do I hide the button?

相关标签:
9条回答
  • 2020-11-29 05:58
    document.getElementById('btnID').style.visibility='hidden';
    
    0 讨论(0)
  • 2020-11-29 06:03
    <script>
    $('#btn_hide').click( function () {
    $('#btn_hide).hide();
    });
    </script>
    <input type="button" id="btn_hide"/>
    

    this will be enough

    0 讨论(0)
  • 2020-11-29 06:04
    //Your code to make the box goes here... call it box
    box.id="foo";
    //Your code to remove the box goes here
    document.getElementById("foo").style.display="none";
    

    of course if you are doing a lot of stuff like this, use jQuery

    0 讨论(0)
提交回复
热议问题