取消設(shè)置的方法
要先設(shè)置函數(shù)最后一個(gè)不太好設(shè)置要用一個(gè)新的方法,然后把函數(shù)添加到
標(biāo)簽中的onclick中引用函數(shù)。 //定義"取消設(shè)置"的函數(shù) function quxiao(){ ? ? ? var a=document.getElementById("txt"); ? var b=confirm("確定取消全部設(shè)置嗎?"); ? ? ? ? ?if (b==true){ ? ? ? ? ? a.removeAttribute("style");//刪除屬性函數(shù) ? ? ?//object.removeAttribute(屬性名); } else{}//設(shè)置空白,就相當(dāng)于不設(shè)置 }
2016-07-15
function quxiao()
{
? ? ? var b;
? ? ? ?var a=document.getElementById("txt"); ? var b=confirm("確定取消全部設(shè)置嗎?"); ??
? ? ? ? if (b=true){ ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ?document.write("打開");
? ? ? ? ? ? ? ? ? ? ? ? b=prompt("http://idcbgp.cn/qadetail/152354?lastmedia=1")
? ? ? ? ? ? ? ? ? ? ? ? window.open('b',_blank);
? ? ? ? ? ? ? ? ? ? ? ? ?a.removeAttribute("style"); ? ??
? ? ? ? ? ? ? ? ? ? ? ? ?object.removeAttribute(屬性名);?
? ? ? ? ? ? ? ? }?
? ? ? ? ? ? else{
? ? ? ? ? ? ? ? ? document.write("關(guān)閉");? ? ? ? ? ? ??
}
?}
2016-07-15
<script>
function qxsz(){
??? var qxsz=confirm("確定取消設(shè)置嗎?");
??? if(qxsz==true){
??????? var wbys=document.getElementById("txt");
??????? wbys.style.cssText="none";
??? }
}
</script>