function?block1(){????var?tt?=?document.getElementById("buttom1");????var?ttm?=?document.getElementById("topt");????tt.onclick?=?function(){????????if(ttm.style.display?=?"block"){????????????ttm.style.display?=?"none";????????????alert(ttm.style.display)????????}else{????????????ttm.style.display?=?"block";????????????alert(ttm.style.display)????????}????}}為什么用上去之后點擊一次 ?#topt消失 而第二次的話就沒運行else語句的內(nèi)容而是繼續(xù)運行第一條#topt{? ? display: block;? ? position: fixed;? ? cursor: pointer;? ? right: 20px;? ? bottom: 100px;? ? font-size: 4px;
JS中的CSS問題
玉玨念北
2016-02-12 00:54:37