/Targetenemy is the equivalent of hitting Tab.
However, /Targetenemyplayer will not target npc's, which include pets.