最后一個(gè)取消設(shè)置怎么沒效果
為什么最后一個(gè)沒反應(yīng)呀 function clear() { ? ?var ad=document.getElementById("txt"); ? ?var c=confirm("確認(rèn)清除所有設(shè)置嗎?"); ? ?if(c==true) ? ?{ ? ? ? ?ad.removeAttribute("style"); ? ?}
為什么最后一個(gè)沒反應(yīng)呀 function clear() { ? ?var ad=document.getElementById("txt"); ? ?var c=confirm("確認(rèn)清除所有設(shè)置嗎?"); ? ?if(c==true) ? ?{ ? ? ? ?ad.removeAttribute("style"); ? ?}
2016-06-02
舉報(bào)
2016-06-02
function resettext(){
? ? var mychose = confirm();
? ? if(mychose==true){
? ? ? ?mydiv.removeAttribute("style");
? ? }
}
//注意字符 ?不要拼錯(cuò)?。?!
2016-06-02
?var tt=confirm("您真的要取消設(shè)置?");
? ? ? ? if(tt==true)
? ? ? ? {
? ? ? ? ? ?document.getElementById("txt").style="";
? ? ? ? }
? ? ? ? else
? ? ? ? {}
2016-06-02
function res(){
? ? var con=confirm("是否恢復(fù)原始值?");
? ? if(con==true){
? ? ? ? var myChar5=document.getElementById("txt");
? ? ? ? myChar5.removeAttribute("style");
? ? }測試可以啊
2016-06-02
ad.removeAttribute("style"); 這個(gè)style是什么,自定義的嗎