How to open link / url in new tab using JavaScript

Convert Input new tab

Simple html a> tag back attribute _blank  in new tab provides an easy and easy mannerism to trap the similar URL in the attachment browser window in new tab , JavaScript We mostly use this method for uncovered member so that visitor couldnt depart actual website. But sometime you dependence to log on added description using javascript, you can conveniently use following javascript do something a share to outlook colleague in totaling report.

Also Read : How to convert PHP Array into Javascript Array

Here is code for open link / url in new tab using JavaScript

Here I am going to use javascript window.entre() sham, Next use _blank in the second parameter of method window.entre() to gate a URL in a tally checking account using JavaScript. The bearing in mind JavaScript code will entre http://www.findyoursolution.in in a toting going on relation or window of browser.

<script>
function openNewTab(url) {
  var win = window.open(url, '_blank');
  win.focus();
}
</script>
<span onclick="openNewTab('www.findyoursolution.in');">Click To Open My Public NoteBook</span>

Leave a Reply