Button Onclick Href In Button Tag With Target Code Example


Example 1: href on a button

<button onclick="window.location.href='/page2'">Continue</button>

Example 2: button as href

<button onclick="location.href='http://www.example.com'" type="button">          www.example.com</button>

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable