onclick open url in same window code example
Example 1: window open same tab
window.open("https://www.youraddress.com","_self")
Example 2: javascript onclick open url same window
/* FIRST WAY*/
window.open("instagram.com/9_tay", "_self")
/* SECOND WAY*/
window.location.href = "instagram.com/9_tay"
/* THEARD WAY*/
window.location.replace("instagram.com/9_tay")