Window.location doesn't work in on change

Hi all,

In erpnext website, I’ve added a select box in a page
<select class="form-control" onchange="window.location='https://www.google.co.in'">
but it doesn’t work. I’ve tried window.close(), window.location.href etc in onchange.Its also not working. What might be the problem?
Somebody please help

try with jquery something like:
$(‘.form-control’).on(“change”, function() {
console.log(‘changed’);
});