问答详情
源自:4-1 编程挑战

取消设置。。

var my=document.getElementById("txt");   function color(){       my.style.color="red";   }       function re(){       var a=confirm("是否要取消设置?");    if(a==true){              my.removeAttribute('style');    }   else{       alert("no")   }     }

提问者:深海mm 2017-07-10 21:18

个回答

  • Good丶猫宁
    2017-07-10 22:07:22

    object.removeAttribute('style');