求大神詳解 removeAttribute 恢復(fù)原始值為什么不會把head里的style也給移除
求大神詳解 removeAttribute 恢復(fù)原始值為什么不會把head里的style也給移除
function replace(){
var mychar= document.getElementById("txt");
var message=confirm("確認返回默認狀態(tài)嗎?")
if(message==true){
mychar.removeAttribute("style");}
else{};
}
2015-12-17
你沒有加上head里面的樣式
2015-12-17
清除內(nèi)聯(lián)樣式