JavaScript根据一个元素的显示隐藏控制另一个元素的显示和隐藏

<script>
function xianshi(){
var odaohang1=document.getElementById('daohang1');
var ozuocedaohang=document.getElementById('zuocedaohang1');
var otoggle=document.getElementById('toggle-sidebar');
if($('#zuocedaohang1').is(':hidden') ){
odaohang1.style.display='none';
}
ozuocedaohang.style.display='block';
}
</script>
posted @ 2019-12-26 20:06  绿林豪士  阅读(1206)  评论(0编辑  收藏  举报