定義"取消設(shè)置"的函數(shù)
function ClickClear(){
????var txt1 = document.getElementById("txt");
????txt1=confirm("是否取消設(shè)置?");
????if(txt1==true){?
????????document.getElementById("txt").removeAttribute("style");?
????}?
?}
function ClickClear(){
????var txt1 = document.getElementById("txt");
????txt1=confirm("是否取消設(shè)置?");
????if(txt1==true){?
????????document.getElementById("txt").removeAttribute("style");?
????}?
?}
2016-03-09
舉報
2016-03-09
var mye=document.getElementById("txt");
function resetStyle(){
????var message=confirm("你確定重置所有樣式嗎?");
????if(message==(true){
????????mye.removeAttribute('style')
}
}
2016-03-09
除了樓上的方法還有沒有其他的實現(xiàn)???
2016-03-09
//定義"取消設(shè)置"的函數(shù)
function rest(){
? ? if(confirm("是否取消設(shè)置")){
? ? var obj=document.getElementById("txt");
? ? obj.style.color="black";
? ? obj.style.backgroundColor="white";
? ? obj.style.width="600px";
? ? obj.style.height="400px";
? ? obj.style.display="block";
? ? }