I would like to connect the button to a different webpage

Is it possible to connect this code with page number 2?

<div class="login">
<h1>Login</h1>

<form method="post">

<input type="text" name="u" placeholder="Username" required="required" />
<input type="password" name="p" placeholder="Password" required="required" />
 <button  type="submit"  class="btn btn-primary btn-block btn-large"></a>Let me in.</button>

Answer №1

Avoid using close tags like </a> in your code, instead consider creating a form to execute specific actions.

<form action="somewhere.html">
<input type="text" name="u" placeholder="Username" required="required" />
<input type="password" name="p" placeholder="Password" required="required" />
<button  type="submit"  class="btn btn-primary btn-block btn-large">Let me in.</button>
</form>

Answer №2

To incorporate the 'a' tag, make sure it follows this format:

<a href="http://facebook.com"><button type='button'>let's connect</button></a>

If you want the new link to open in a new tab/window, simply include target="_blank" within the 'a' tag:

ie: <a href="http://facebook.com" target="_blank">

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it feasible to create a doughnut chart with curved edges?

My goal is to create a doughnut chart, but my search for reliable CSS/SVG/Canvas solutions has not been successful. https://i.sstatic.net/Rq6Lx.jpg I want each segment to have fully rounded corners, which presents a unique challenge. ...

Using Bootstrap 4 to Filter Cards by Title and Tag

I'm attempting to develop searchable cards using HTML, JavaScript, and Bootstrap 4, but I'm facing issues with my code. My goal is to filter these three cards using a search bar, based on their title (h5.card-title) and tags (a.badge). Below is ...

Issue with data decimation in Chart.js, encountering problems with parsing

I'm facing a challenge while plotting a graph using chart JS with approximately 300,000 data points. The performance is slow, so I am exploring ways to enhance it by utilizing the data decimation plugin. However, the data doesn't seem to be getti ...

Modify input attribute by selecting a label

What I'm looking for: I am trying to add a checked status to the input field when a label is clicked. However, when I attempted this, I received two alerts displaying "true." This behavior is incorrect, and upon inspection in Firebug, the input fiel ...

Using the spread operator in a component's render function could potentially lead to an endless update loop

Although this issue has been addressed before in a discussion about the "You may have an infinite update loop in a component render function" warning in Vue component, the solution provided did not resolve my problem. I am seeking assistance to ...

Is it feasible to monitor recurring events with Selenium and Node.js?

Currently, I am working on a website that heavily relies on AJAX/REST API calls to carry out various functions. These calls broadcast events upon completion or failure. My objective is to monitor these document events and activate a function in Selenium ( ...

Techniques for extracting a specific section of a string in Javascript

On another web page, I am extracting a specific string. My goal is to store that string in a variable after a specific point. For example: #stringexample var variable; I need the variable to only include "stringexample" without the # symbol. How can I a ...

Setting up AngularJS can be a pain

Greetings, my name is Rahim. While setting up AngularCLI, I ran into the following issue: 'ng' is not recognized as an internal or external command, operable program or batch file. C:\Users\ASUS ROG>ng --version 'ng' is ...

What are the key distinctions between DOCS and PSD base64 URLs?

My current challenge involves displaying a preview of attachments. I want to show an IMAGE SVG preview for image attachments and a PDF preview for PDF attachments, both based on their respective base64 formats. For example, I am currently using the split m ...

Removing an article from a Vue.js localStorage array using its index position

I am facing an issue while trying to remove an item from localStorage. I have created a table to store all the added items, and I would like to delete a specific article either by its index or ideally by its unique id. Your assistance is greatly apprecia ...

Guidelines for queuing method calls using Vue.js

Is there a way to invoke a method using a queue system? Imagine having a method that makes API calls and can only handle 3 calls at once. If more than 3 calls are made from a component, the remaining ones should wait until one call finishes before proceedi ...

Is it possible to protect assets aside from JavaScript in Nodewebkit?

After coming across a post about securing the source code in a node-webkit desktop application on Stack Overflow, I began contemplating ways to safeguard my font files. Would using a snapshot approach, similar to the one mentioned in the post, be a viable ...

Enhancing Angular Directives with Dynamic Templates upon Data Loading

I am facing an issue with a directive that is receiving data from an api call. While the directive itself functions properly, the problem seems to be occurring because the directive loads before the api call is complete. As a result, instead of the expecte ...

Ways to eliminate the white background placed behind the arrow on my bootstrap carousel

I've been attempting to create a video carousel using Bootstrap 5, and one issue I'm encountering is the appearance of a white background when hovering over the arrow. Normally, it shouldn't display a background, but for some reason, it does ...

Having trouble with Django routing redirecting me to the incorrect URL

I am currently working on developing a small poll application using Django. The main page of the app includes buttons that allow users to create new polls and delete existing ones. For the delete functionality, I have set up a route that should direct the ...

Element sticking on scroll down and sticking on scroll up movements

I am currently working on a sticky sidebar that catches and stays fixed at a certain scroll point using JavaScript. However, I am facing an issue where I need the sidebar to catch when scrolling back up and not go further than its initial starting point. ...

What is the best way to split the vertices of a mesh in Three.js?

Is there a way to disassemble the vertices of a Three.js mesh? I am interested in tearing apart a 3D object using mouse input. Recently, I developed a GLSL vertex shader for this web application that shifts the vertices of a mesh based on the brightness of ...

Difficulties encountered when trying to interact with buttons using JS and Bootstrap

I'm working with a Bootstrap 5 button in my project and I want to access it using JavaScript to disable it through the attribute. Here is the code I've been testing: Script in Header: ` <script> console.log(document.getElementsByName(& ...

Tips for showcasing numerous images in a single row on a website

Looking to organize images into rows with 3/4 images in each row, not stacked vertically as shown below. Here is the code I have tried: <html> <head> <title>Images Displayed in Rows</title> <meta charset="utf-8"> <meta ...

ensuring that there is no wrapping and the children have a width of 100%

Would you like to have text inputs placed in a single line inside a div without manually setting their widths? <div> <input type="text" /> <input type="text" /> <input type="text" /> </div> div { width: 300px ...