幫幫忙咯 新手一枚
function setCon() { ? ?var message=confirm("你確定取消設(shè)置么?") ; ? ?if(message==true) ? ?{ ? var txt1=document.getElementById("txt"); ? ? ? ?txt1.style.removeAttribute('style'); }關(guān)于這樣 為什么點(diǎn)擊按鈕沒有效果呀呀呀?
function setCon() { ? ?var message=confirm("你確定取消設(shè)置么?") ; ? ?if(message==true) ? ?{ ? var txt1=document.getElementById("txt"); ? ? ? ?txt1.style.removeAttribute('style'); }關(guān)于這樣 為什么點(diǎn)擊按鈕沒有效果呀呀呀?
2016-01-25
舉報(bào)
2016-01-26
txt1后面沒有style
2016-01-25
txt1.removeAttribute("style");就可以了,具體不太清楚
2016-01-25
那樣是直接搬掉了整個(gè)style!
嘗試: