Skip to content
Pakainfo

Pakainfo

Web Development & Good Online education

  • Home
  • Blog
  • Categories
  • Tools
  • Full Form
  • Guest Post
  • 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?

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

Free Live Chat for Any Issue

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>

Download

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.

Pakainfo
Pakainfo

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Read Also:  how to pass parameter in javascript function from html?

Related posts:

  1. how to link one page to another page in html using button?
  2. JavaScript Redirect URL Example
  3. jQuery redirect the user from one page to another
  4. PHP page redirect URL Example php redirect
  5. how to make a button link to another page in html?
  6. Redirect page after delay using Jquery
  7. Disable button after click html in jQuery – prevent multiple clicks
  8. How to Disable Submit Button After Click using jQuery?
  9. html code to send email on button click
  10. how to disable browser back button in php?
Read Also:  Redirect page after few seconds in PHP
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

Search

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
youtube tag extractor

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 (50) Ajax (464) AngularJS (377) ASP.NET (61) Bollywood (94) Codeigniter (175) CSS (98) Earn Money (61) Education (53) Entertainment (110) fullform (79) Google Adsense (62) Highcharts (77) Hollywood (95) JavaScript (1356) Jobs (39) jQuery (1422) Laravel (1086) LifeStyle (50) movierulz4 (49) Mysql (1029) Mysqli (890) Node.js (39) php (2116) Programming (2328) Python (96) ReactJS (37) Software (117) Software (81) Stories (87) tamilrockers (90) Tamilrockers kannada (50) Tamilrockers telugu (49) Tech (121) Technology (2373) Tips and Tricks (112) Tools (139) Top10 (343) Trading (59) Trending (55) VueJs (250) Web Technology (86) webtools (155) wordpress (165) World (169)

Advertise With Us

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

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
  • YouTube Monetization
  • 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

© 2022 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 YouTube Tag Extractor