課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
2018-11-04
源自:JavaScript入門篇 4-1
正在回答
最笨的方法,挨個(gè)兒把原來的屬性抄一遍;
取巧的做法,點(diǎn)擊按鈕刷新頁面
Judy4001 提問者
function axa() {
var txt = document.getElementById("txt");
var txt = confirm("是否取消設(shè)置?");
if(txt==true){
txt.removeAttribute("style");
}
//調(diào)用 方法axa();
//函數(shù)txt換成你要用的函數(shù)
//移除屬性 removeAttribute("style");
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
2 回答取消設(shè)置的函數(shù)怎么寫?
3 回答”取消設(shè)置“函數(shù)怎么寫
3 回答取消設(shè)置的函數(shù)
1 回答取消設(shè)置函數(shù)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-11-05
最笨的方法,挨個(gè)兒把原來的屬性抄一遍;
取巧的做法,點(diǎn)擊按鈕刷新頁面
2018-11-06
function axa() {
var txt = document.getElementById("txt");
var txt = confirm("是否取消設(shè)置?");
if(txt==true){
var txt = document.getElementById("txt");
txt.removeAttribute("style");
}
}
//調(diào)用 方法axa();
//函數(shù)txt換成你要用的函數(shù)
//移除屬性 removeAttribute("style");