Why doesn't backgroundColor=rgb(a,b,c) work?

前端 未结 5 2103
情书的邮戳
情书的邮戳 2021-02-18 21:28

    
         Colors 
    

    
    

        
5条回答
  •  广开言路
    2021-02-18 22:08

    Use quotes around the value

    document.body.style.backgroundColor="rgb(" + a + "," + b + "," + c + ")";
    

提交回复
热议问题