How to redirect to new page on click of button in html?



How to redirect to new page on click of button in html?..

Answer / Surya Bhatia

To redirect to a new page on button click in HTML, you can use the JavaScript window.location object. For example: `<button onclick="window.location.href='new-page.html'">Click here</button>`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More HTML DHTML Interview Questions

List out the advantages of html5?

1 Answers  


How to utilize a server-sent event in HTML5?

1 Answers  


Which methods are used to draw a straight line on a Canvas?

1 Answers  


What is unpaired tag?

1 Answers  


What are HTML tags?

2 Answers  


What is dom in browser?

1 Answers  


What is xpath in html?

1 Answers  


What are the features of xhtml?

1 Answers  


How do I set the focus to the first form field?

1 Answers  


Why td is used in html?

1 Answers  


Explain alternate text in image mapping?

1 Answers  


What is dhtml? What are the features of dhtml?

1 Answers  


Categories