redirect button to another page html using js code example Example: js onclick redirect <button onclick="location.href='www.yoursite.com'">Click Me</button>