location.assign('YourUrl');
<html> <head> </head> <body> <input type="button" value="Visit thread" onclick="window.location = 'http://www.codeproject.com/Questions/407140/location-href-is-not-working-in-IE9-and-Chrome';"/> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)