function cancel(){ var mychar = document.getElementById("txt"); var mymessage= confirm("是否恢复初始设置?") ; if (mymessage) { document.getElementById("txt").removeAttribute("style"); }; }
呃。。发错了