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

前端 未结 9 965
陌清茗
陌清茗 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:40

    Why don't use event? like the following:

    
    
    
    function itemChange(sender) {
        var c = document.getElementById("content");
        if (sender.value > 0) {
            c.innerHTML = sender.value;
            c.style.visibility = "visible";
        } else {            
            c.innerHTML = "selection result";   
            c.style.visibility = "hidden";
        }
    }
    

提交回复
热议问题