Skip to content
← Back to Community
My Javascript isn't doing what I'm telling it to
Profile icon
Japoll246

I am really new to Javascript and basically I made this href a button because the styling wasn't working on an [ tag. When I click the button it opens a page that shows code I have since replaced and I am not quite sure why. Can anyone help?]

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
Japoll246
Comments
hotnewtop
Profile icon
Coder100

lol that's not how you use buttons

Profile icon
Japoll246

@Coder100 I just made it an []. Thanks. I was now wondering, do you know of a way to make the css styling change when it's clicked? Right now in CSS it says to change the text-input border color when I hover over it. Is there anyway to have that border color stay when I click on and then move my mouse to type something?

Profile icon
Coder100

@Japoll246 yeah, it would be the :focus

Profile icon
Coder100
input:focus { border: 1px solid red; }

change that to however you want ^^
@Japoll246

Profile icon
Japoll246

@Coder100 Thanks!

Profile icon
Coder100

glad to help! @Japoll246