取消設(shè)置函數(shù)設(shè)置問題
為什么當(dāng)取消設(shè)置函數(shù)名設(shè)置為delete()時,所有的其他按鈕都失靈了?
? function delete(){
? ? ? ? var mychose = confirm("是否取消設(shè)置?");
? ? ? ? if(mychose==true){
? ? ? ? ? ? mydiv.removeAttribute("style");
? ? ? ? }
? ? }
為什么當(dāng)取消設(shè)置函數(shù)名設(shè)置為delete()時,所有的其他按鈕都失靈了?
? function delete(){
? ? ? ? var mychose = confirm("是否取消設(shè)置?");
? ? ? ? if(mychose==true){
? ? ? ? ? ? mydiv.removeAttribute("style");
? ? ? ? }
? ? }
2017-02-23
舉報
2017-02-26
我知道答案了,因為變量名不能時關(guān)鍵字,而delete就是關(guān)鍵字
2017-02-24
你好,我想請問一下removeAttribute是這幾節(jié)里面講的嗎,我怎么沒有看到。。。
2017-02-23
也許是你其他代碼有問題呢