Jump to content

Changing a button's onclick and stay()


itrollmework

Recommended Posts

function changeBtn(btn)
{
if (! btn.style)
{
alert("Big no for you and dont ask y, just cant do it D:");
return;
}
btn.style.background = "#00FF00";
btn.style.color = "black";
return;
}
<input type="button" id="btn1" value="glowwwww!!!" onclick="changeBtn(this)"></td>

so i found this code on the internet, and it is very useful...

sadly.... every time i refresh the page the button will go back to default color...

 

how can i make it stay green even tho i refresh the page???

thankyou :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...