on click go to url code example

Example 1: onclick url

<button onclick="location.href='logout.php';">logout</button>

Example 2: onclick go to url

<input type=button onClick="opener.location='https://www.plus2net.com/'" value='Make the Main window change'>
<input type=button onClick="opener.location='https://www.plus2net.com/html_tutorial/button-linking.php'" value='Bring the button linking tutorial again'>
<input type=button onClick="location='https://www.plus2net.com/'" value='Make the current  window change'>
<input type=button onClick="self.close();" value="Close this window">

Example 3: onclick open link js

window.open(url);

Example 4: onclick go to url

onclick go to url

Tags:

Css Example