using onclick to go to another page code example

Example 1: 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 2: javascript onclick to another page div

<div onclick="window.location.href = 'http://example.com';">Click this div to get redirected.</div>

Tags:

Css Example