html onclick go to url code example Example 1: onclick open link js window.open(url); Example 2: onclick go to url onclick go to url