JSFiddle - React, Tailwind, and code Playground

by meo

HTML

<a href="www.google.com" target="_blank">google halt</a>

JavaScript

var target, link, $a = $("a:eq(0)");
target = $a.attr("target");
link = $a.attr("href");

if( target.toLowerCase() === "_blank" ){
    window.open(link)
}else if( target.toLowerCase() === "_parent" ) {
    window.top.location = link;   
}