Disable/enable element with checkbox and jQuery?

前端 未结 6 1163
自闭症患者
自闭症患者 2020-12-29 11:11

I have a checkbox and if I tick it I want a textfield to become enabled (disabled as default) and when I untick the the checkbox I want it to become disabled again.

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 12:11

    Here's a page that does what you're looking for - it's pretty minimal but shows what you need

    
        
            
            
        
        
            
            
        
    
    

提交回复
热议问题