Javascript examples for CSS Style Property:background
Set CSS style backgroundColor to =rgb(a,b,c)
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <title> Colors </title> <script type="text/javascript"> var a = parseInt(prompt("Enter R")); var b = parseInt(prompt("Enter G")); var c = parseInt(prompt("Enter B")); document.body.style.backgroundColor='rgb(' + a + ',' + b + ',' + c + ')'; </script> </body>/*from www. ja va 2s. c o m*/ </html>