Jump to content

Changing a button's onclick and stay()

Recommended Posts

function changeBtn(btn)
if (! btn.style)
alert("Big no for you and dont ask y, just cant do it D:");
btn.style.background = "#00FF00";
btn.style.color = "black";
<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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...