最贊回答 / 慕男嬸
因為 setAttribute 必須有2個參數,你只傳進去了1個。setAttribute,第1個參數是要設置的屬性名,第2個參數是屬性值。例如setAttribute('style','width:100px')
2015-12-31