function qx(){ var mychar=confirm("是否取消所有設(shè)置?"); if(mychar){ txt.style.color=""; txt.style.backgroundColor=""; txt.style.width=""; txt.style.height=""; txt.style.display=""; } }

小周EC
2014-07-17
2 回答
舉報
0/150
提交
取消
2014-07-20
var txt = document.getElementById("txt"); // 全局變量 //定義"取消設(shè)置"的函數(shù) function cancelSetting(){ var cancel = confirm("是否取消格式設(shè)置?"); if(true == cancel) { txt.style = "txt"; } }
2014-07-20
看來是搞懂了,不錯。