那個(gè)大神告訴我一下 為什么恢復(fù)原來時(shí)候要 p1.style="none" ?
//定義"取消設(shè)置"的函數(shù)
function add5(){
? ? var s =confirm("確定恢復(fù)嗎");
? ? if(s==true){
? ? var p1 = document.getElementById("txt");
? ? p1.style="none"? ?
? ? }else{
? ? alert("再試一試");
? ? }
}
//定義"取消設(shè)置"的函數(shù)
function add5(){
? ? var s =confirm("確定恢復(fù)嗎");
? ? if(s==true){
? ? var p1 = document.getElementById("txt");
? ? p1.style="none"? ?
? ? }else{
? ? alert("再試一試");
? ? }
}
2019-09-27
舉報(bào)
2019-09-28
因?yàn)樵瓉淼拇a不沒有樣式的..?? 要恢復(fù)原來的就必須把樣式去掉