It is not possible - due to security concerns.
unless by "tab" you mean a window and a popup window that (due to browser preferences) opened up in a new tab. If this is the case, then yes you can.
//focus opener... from popup
window.opener.focus();
//focus popup... from opener
yourPopupName.focus();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…