Simple skin change
Blue Red Green
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script> function changeColor(str){ var body = document.getElementById("b"); body.style.backgroundColor = str; } </script> </head> <body id="b" > <button onclick="changeColor('blue')">蓝色</button> <button onclick="changeColor('red')">红色</button> <button onclick="changeColor('green')">绿色</button> </body></html>
The above is the detailed content of How to achieve web page skin change effect. For more information, please follow other related articles on the PHP Chinese website!