為什么我的取消設(shè)置按鈕點(diǎn)下去沒(méi)有反應(yīng)
var p1=document.getElementById("txt");
function cancel() {
? ? ? ? var myans=confirm("是否確定取消操作?")
? ? ? ? if (myans==true){
? ? ? ? ? ? p1.removeAttribute=('style');
? ? ? ? }
? ? }
其他幾個(gè)按鈕都能按,只有這個(gè)一直沒(méi)實(shí)現(xiàn),想了很久也不明白是怎么回事,求大神解答
2018-07-15
demo.removeAttribute('style');
2018-07-24
.removeAttribute('style');
removeAttribute(指定的屬性) 方法刪除指定的屬性。