let url ='https://www.google.com/search?q='+document.getElementById('search').value;
window.open(url)
This works fine but I want to open this in the same tab
so when I use
window.open(url,"_self")
or
``` window.location.href =url; ````
it just reloads the same page