Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8815089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:17:19+00:00 2026-06-14T04:17:19+00:00

I have a web page that has a button. Currently I am binding this

  • 0

I have a web page that has a button. Currently I am binding this button to a javascript handler that makes the page redirect to a given URL when it is clicked.

HTML:

<button class="click-me">Clike me to navigate</button>

JS:

$('.click-me').on('click', function() { window.location = '/myloc'; });

I am now trying to build a fallback (no-javascript) version of this page. I would like this button to do the same job but without using javascript. In other words, I am trying to make this button functional even if javascript of the browser is disabled.

I know this can be achieved by form (as shown below). But I am looking for any cleaner implementation.

<form name="hack" action="/myloc">
  <button type="submit" class="click-me">Click me to navigate</button>
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:17:21+00:00Added an answer on June 14, 2026 at 4:17 am

    Use an a element, that’s what they’re for:

    <a class="click-me" href="/path/to/whatever/page">Click me to navigate</a>
    

    And then simply style it as a button.

    For example with the following CSS:

    .clickMe {
        -moz-appearance: button;
        -ms-appearance: button;
        -o-appearance: button;
        -webkit-appearance: button;
        appearance: button;
        text-decoration: none;
        color: #000;
        padding: 0.2em 0.4em;
    }​
    

    JS Fiddle demo.

    (Obviously this assumes the use of a browser that supports the appearance (or vendor-prefixed versions) CSS property.)

    References:

    • appearance (albeit it’s the -moz- prefixed MDN documentation).
    • appearance property, at the W3C.
    • Unfortunately-dropped CSS3 features (at the W3C).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have web forms page that has 2 controls. A gridview and an associated
I have created a web page that has two bars across the top of
I have a simple jQuery code that runs on a web page that has
I have a web application that has a page that loads the content from
I have a ASP.NET web page that contains many textboxes. Each textbox has a
I have a button on a web page that when clicked connects to my
I have a web page that has a Folder Picker pop up. It allows
I have a web browser control which has navigated to a given page and
new on rails and using windows for now,, i have web page that user
I have a webpage that has a button that sends a letter on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.