var path = document.getElementsByTagName("path");
(function fillCss(){ for(var i in path){
path[i].setAttribute("fill","none");
path[i].setAttribute("stroke","black");
path[i].setAttribute("stroke-width","0.5");
}
})();樣式被執(zhí)行但是報錯:Uncaught TypeError: path[i].setAttribute is not a function(…)
setAttribute("",""); 放在for循環(huán)中,報錯
海綿寶寶撒
2018-09-03 12:38:32