click text open new window javascript onclick html code example
Example 1: open link in new tab javascript
window.open('https://www.codexworld.com', '_blank');
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")