adding changing color button to css?
-
Hi I tried to add a javascipt to the css of my blog for a changing background color button but it didn’ t work.
Is there a possibility to add such a button in photography and if this is the case how does this work?
Thanks
The code i added was :
<script language=”javascript”>
function chngebck (id)
{
switch (id)
{
case ‘b1’:
document.body.bgColor = “black”;
break;case ‘b2’:
document.body.bgColor = “white”;
break;}
}
</script>
<body>
<input type=”button” id=”b1″ onclick=”chngebck(this.id)” value=”Button1″/>
<input type=”button” id=”b2″ onclick=”chngebck(this.id)” value=”Button2″/></body>
I added it above the <body>.The blog I need help with is: (visible only to logged in users)
- The topic ‘adding changing color button to css?’ is closed to new replies.