how to call a url when clicking a button in html code example Example: onclick url <button onclick="location.href='logout.php';">logout</button>