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

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

    
         Colors 
    

    
    

        
5条回答
  •  既然无缘
    2021-02-18 22:00

    You have no function called rgb(...)

    I think you meant to do:

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

提交回复
热议问题