How to set “style=display:none;” using jQuery's attr method?

后端 未结 8 1597
闹比i
闹比i 2020-12-24 12:04

Following is the form with id msform that I want to apply style=\"display:none\" attribute to.

相关标签:
8条回答
  • 2020-12-24 13:03

    You can just use: $("#msform").hide(). This sets the element to display: none

    0 讨论(0)
  • 2020-12-24 13:06

    Except hide() mentioned in other answers, you can use css():

    $("#msform").css("display","none")
    
    0 讨论(0)
提交回复
热议问题