這個(gè)removeAttribute()函數(shù)的意義具體誰(shuí)能解答?
//定義"取消設(shè)置"的函數(shù) function tmove() { ? ?var temp=confirm("確認(rèn)要取消設(shè)置嗎?"); ? ?if(temp) ? ?{ ? ? var mychar=document.getElementById("txt"); ? ?mychar.removeAttribute("style"); ? ?} }初學(xué)者,歡迎評(píng)價(jià)。
2016-09-28
這個(gè)removeAttribute方法是刪除<>標(biāo)簽內(nèi),屬性名稱對(duì)應(yīng)的字段,比如標(biāo)簽內(nèi)有style="height:200px",此時(shí),該部分會(huì)被刪除