Skip to content
pakainfo

Pakainfo

Web Development & Good Online education

  • Home
  • Blog
  • Categories
  • Tools
  • Full Form
  • Guest Post
    • Guest Posting Service
  • Advertise
  • About
  • Contact Us

how to redirect from one page to another in html on button click?

January 30, 2021 Pakainfo jQuery, JavaScript, php, Programming, Technology Leave a comment

Today, We want to share with you how to redirect from one page to another in html on button click?.In this post we will show you onclick redirect to another page jquery, hear for redirect to another page after form submit html we will give you demo and example for implement.In this post, we will learn about How To Make A Button Link To Another Page In Html? with an example.

How to Make Submit button redirect to another page in HTML?

Contents

  • How to Make Submit button redirect to another page in HTML?
    • Redirect using HTML Forms
    • Link Submit button using Anchor Tags in HTML
    • Link Submit button to Another page using JavaScript
    • submit button redirect to another page HTML
    • how to handle multiple submit buttons in HTML forms
    • redirect to another page after form submit HTML
  • Button Type Submit redirect
  • Use the JavaScript window.location Property
    • Related posts

<button onclick="window.location.href='b.php'">Click me</button>

Redirect using HTML Forms

index.html

<html>
   <head>
     <title>Submit Button Redirect</title>
   </head>    
    <body>     
     <form method="POST" action="freedownloadthankyoupage.php">
       <input type="submit"/>
     </form>    
    </body>    
</html>

Link Submit button using Anchor Tags in HTML

index.html

<html>    
   <body> 
    
     <a href="http://www.pakainfo.com">
      <input type="submit"/>
     </a>
    
   </body>    
</html>

Link Submit button to Another page using JavaScript

index.html

  <html>    
    <body> 
    
     <input type="submit" onClick="getWebinfo()"/>
     <script>
       function getWebinfo() {
         window.location.href="http://www.pakainfo.com";
       }
     </script>
    
    </body>    
  </html> 

submit button redirect to another page HTML

Example 4:

  <html>
    
    <body> 
    
     <form action="nextpage.php" method="POST">
       <input type="submit"/>
     </form>
    
    </body>
    
  </html>

Redirect using HTML Anchor Tags

  <html>
    
    <body> 
    
     <a href="http://www.pakainfo.com">
       <button>Click Me</button>
     </a>
    
    </body>
    
  </html>

how to make a button or a page link to another page in HTML using the button

  <html>
    
    <body> 
    
     <a href="http://www.pakainfo.com">
       <button>Click Me</button>
     </a>
    
    </body>
    
  </html>

how to handle multiple submit buttons in HTML forms

Example 6:

  <html>
    
    <body> 
    
     <input type="submit" id="frmSaveData"/>
      <script>
       document.getElementById("frmSaveData").addEventListener("click", getWebinfo);
       function getWebinfo() {
         window.location.href="http://www.pakainfo.com";
       }
      </script>
    
    </body>
    
  </html>

a href Submit form onclick

  <html>
    
    <body> 
    
     <a href="myformnextArticle.html">
       Click Me 
     </a>
    
    </body>
    
  </html>

redirect to another page after form submit HTML

index.html

  <html>
    
    <body> 
    
     <form method="POST" action="userLogin.php">
      <input type="text"/>
      <input type="submit"/>
     </form>
    
    </body>
    
  </html>

button type submit redirect to another page

<html>
<body>

  <a href="http://www.pakainfo.com">
    <input type="submit"/>
  </a>

</body>
</html>

Button Type Submit redirect

<html>
<body>

  <form action="http://www.pakainfo.com">
    <input type="submit"/>
  </form>

</body>
</html>

<button onclick="location.href = 'www.pakainfo.com';" id="myButton" class="float-left submit-button" >About Us</button>

Use the JavaScript window.location Property

index.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript Automatic Page Redirect</title>
<script>
    function clearHeaderLocation() {
        window.location.replace("https://www.pakainfo.com/");
    }      
    setTimeout("clearHeaderLocation()", 10000);
</script>
</head>
<body>
    <p><strong>Note:</strong> You will be redirected to the pakainfo.com in 10 sec. 
    You are not able to get back to this online web page by clicking the browser any like as a google crome, mozila back button.</p>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript Redirect a Page onClick Event - www.pakainfo.com</title>
<script>
    function clearHeaderLocation() {
      window.location.href = "https://www.pakainfo.com/";
    }      
</script> 
</head>
<body>
    <button type="button" onclick="clearHeaderLocation()">Go to Tutorial Pakainfo.com</button>
</body>
</html>

I hope you get an idea about How can I make a button redirect my page to another page?.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related posts:

  1. how to link one page to another page in html using button?
  2. how to make a button link to another page in html?
  3. Redirect page after delay using Jquery
  4. Disable button after click html in jQuery – prevent multiple clicks
  5. How to Disable Submit Button After Click using jQuery?
  6. html code to send email on button click
  7. how to disable browser back button in php?
Also Read This 👉   Multiple Controllers on Page using Angular Example
how to make a button link to another page in htmlhow to redirect to another html page in javascripthow to redirect to another page in html after loginhow to redirect to another page in php on button clickhtml button onclick redirect to another page w3schoolshtml button onclick redirect to same pageonclick redirect to another page jqueryredirect to another page after form submit html

Post navigation

Previous Post:how to add calendar in html form?
Next Post:Marquee tag in html for multiple images

Advertise With Us

Increase visibility and sales with advertising. Let us promote you online.
Click Here

Write For Us

We’re accepting well-written informative guest posts and this is a great opportunity to collaborate.
Submit a guest post to [email protected]
Contact Us

Freelance web developer

Do you want to build a modern, lightweight, responsive website quickly?
Need a Website Or Web Application Contact : [email protected]
Note: Paid Service
Contact Me

Categories

3movierulz (64) Ajax (464) AngularJS (377) ASP.NET (61) Bio (109) Bollywood (108) Codeigniter (175) CSS (98) Earn Money (94) Education (65) Entertainment (131) fullform (87) Google Adsense (64) Highcharts (77) History (40) Hollywood (109) JavaScript (1359) Jobs (43) jQuery (1423) Laravel (1088) LifeStyle (53) movierulz4 (63) Mysql (1035) Mysqli (894) php (2133) Programming (2346) Python (99) Software (197) Software (94) Stories (98) tamilrockers (104) Tamilrockers kannada (64) Tamilrockers telugu (61) Tech (149) Technology (2425) Tips and Tricks (130) Tools (215) Top10 (514) Trading (98) Trending (79) VueJs (250) Web Technology (116) webtools (201) wordpress (166) World (351)

A To Z Full Forms

Access a complete full forms list with the meaning, definition, and example of the acronym or abbreviation.
Click Here
  • Home
  • About Us
  • Terms And Conditions
  • Write For Us
  • Advertise
  • Contact Us
  • Youtube Tag Extractor
  • Info Grepper
  • Guest Posting Sites
  • Increase Domain Authority
  • Social Media Marketing
  • Freelance web developer
  • Tools
Pakainfo 9-OLD, Ganesh Sco, Kothariya Ring Road, Chokadi, Rajkot - 360002 India
E-mail : [email protected]
Pakainfo

© 2023 Pakainfo. All rights reserved.

Top
Subscribe On YouTube : Download Source Code
We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype Guest Posting Sites