xxxxxxxxxx
<button onclick="window.location.href='https://example.com'">Click me</button>
xxxxxxxxxx
<button onclick="location.href='https://example.com';">Go to Website</button>
xxxxxxxxxx
<!-- VIA HTML -->
<form action="https://google.com">
<input type="submit" value="Go to Google" />
</form>
<!-- VIA CSS -->
<a href="https://google.com" class="button">Go to Google</a>
a.button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
text-decoration: none;
color: initial;
}
<!-- VIA JAVASCRIPT -->
<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />
xxxxxxxxxx
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button Link</title>
</head>
<body>
<h1>Button Link Example</h1>
<!-- Button acting as a hyperlink -->
<button onclick="window.location.href='https://www.example.com'">Visit Example</button>
</body>
</html>
xxxxxxxxxx
<a href="https://example.com" class="button">Click me</a>
<!-- CSS to style the button -->
<style>
.button {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-decoration: none;
font-size: 16px;
border-radius: 5px;
}
</style>
xxxxxxxxxx
<form method="link" action="{% url 'gui' %}">
<input type="button" value="Start">
</form>