removeAttribute()不是刪除指定的屬性嗎,那為什么會(huì)變回默認(rèn)的屬性
var message=confirm("你確定要重置所有設(shè)置么?");
? ? ? ? if(message==true){
? ? ? ? ? ? txt.removeAttribute('style');
? ? ? ? }
var message=confirm("你確定要重置所有設(shè)置么?");
? ? ? ? if(message==true){
? ? ? ? ? ? txt.removeAttribute('style');
? ? ? ? }
2019-03-30
舉報(bào)
2019-03-31
如果文檔指定了屬性默認(rèn)值,那么removeAttribute只是將其恢復(fù)默認(rèn)值。