How to show/hide DIV on selection of ANY drop-down value?

前端 未结 9 963
陌清茗
陌清茗 2020-12-10 22:18

I have found many answers to the question:

How do I show/hide DIV on selection of \"Other\" dropdown value.

However I cannot fin

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 22:58

    Try this :

    Javascript :

    function check_dd() {
        if(document.getElementById('security_question_1').value == "") {
            document.getElementById('test').style.display = 'none';
        } else {
            document.getElementById('test').style.display = 'block';
        }
    }
    

    HTML :

    
    
    
    

提交回复
热议问题