Benefits Of Automatically Open All Links in New Tab with Javascript?
The use of javascript allows links to open in a new tab applies to all existing links on the blog. So when we add this new tab automatic function via javascript, then bloggers no longer need to create a manual link function via HTML code because automatically all links have been set to open in a new tab.
How To Make Automatically Open All Links in New Tab with Javascript?
As Usual Login to Blogger > Then Click Themes > Then Click on Edit HTML After The customize button > Find the code </body> Copy and add the javascript below before the code </body> Tag
<script type="text/javascript"> //<![CDATA[ function externalLinks(){if(document.getElementsByTagName)for(var e=document.getElementsByTagName("a"),t=0;t<e.length;t++){var n=e[t];n.getAttribute("href")&&(n.target="_blank")}}window.onload=externalLinks; //]]> </script>
Don't forget to Click Save Theme and You're done.
Try to see the results by opening one of the articles on your blog. That's all from Droidnur123.