object.className or object.getAttribute(“className/class”)?

前端 未结 3 644
后悔当初
后悔当初 2021-01-12 13:00

Between both those :

Javascript

function setCss(object, css) {
    return (object.className = css);
}
function getCss(object, css) {
    return ob         


        
3条回答
提交回复
热议问题