JavaScript Set Target Blank

document.getElementById("myElement").setAttribute("target","_blank");
Friendly Hawk