Ask coding questions

← Back to all posts
How do I make links in buttons?
mmichalski115

So I'm making a calculator that calculates area of shape and I want to make buttons that switch shapes when clicked, I got the click part done, I just need to know how to turn the buttons into links

Answered by Geocube101 [earned 5 cycles]
View Answer
Voters
XuanmeiLiu
KeithArruda
gamesaver
mmichalski115
Comments
hotnewtop
Geocube101

Do you have the repl?

Listening if a button was clicked:

Listening if a button was clicked (using html onclick):

HTML Code

JS Code

Putting a link element in a button:

mmichalski115

@Geocube101 nice one, thanks

Geocube101

You're Welcome @mmichalski115

KAQ357

@Geocube101 this helped me too!

temperatures

@Geocube101 WOW thanks you i was serching for like 1 days

HamishFin

grass senior

Oded123

@HamishFin is this work for python?
if yes how do you do the button?
and where do you put the URL/link