Open link in new tab from script

how do i open a link in a new tab using the on click event??