when click open url code example
Example 1: onclick url
<button onclick="location.href='logout.php';">logout</button>
Example 2: javascript open link with button
<input type="button" onclick="window.open('http://www.example.com','_blank','resizable=yes')" />