jQuery - How to show/hide text box based on selected drop down

后端 未结 6 1789
广开言路
广开言路 2021-01-01 01:53

Sorry if this is extremely obvious, but I have looked and looked for a solution but haven\'t found anything. I\'m very new to jQuery, so even looking for what I want to do h

6条回答
  •  情书的邮戳
    2021-01-01 02:31

    If you have a select box, i.e.

    
    

    you can bind to .change(), i.e.

    $('.myselect').change(function() {
           --> do show hide here.
    });
    

    Look up jquery .show() and .hide(). (http://api.jquery.com/show and http://api.jquery.com/hide).

提交回复
热议问题