I'm using Landing page so I already have button I want to redirect people after clicking on this button the button id is: button-c86b272c I want to redirect people after clicking on this button not create new button .
I have this code to redirect after time out :
<meta http-equiv="refresh" content="10; URL=www.google.com/" />
but I want one to redirect after click on exicting button not new button I tried change the first code to this :
<meta http-equiv="refresh" onclick="button-c86b272c; URL=www.google.com/" />
but it did not work something isn't right Hope You help me
The
metatag is not a visible DOM element, it means it does not have a "body", thus cannot be clicked on.metatag is used to describe metadata about your page, or set HTTP headers.To redirect to a specific URL after the button is clicked you can use JavaScript:
Add this code to your page or put it in a separate file and make sure to import it or you can add the event listener directly in your HTML using the
onclickproperty, like this:However this approach is not recommended and it's best to put your JavaScript in a separate file and not mix it into the HTML.
Hope this helps!