ActiveX focus question?

When we switch to another html file, the game in the old html will not excute any more; but my question is this, If we have a input textbox in the same html file with unity3d viewer. when we input text, then the w/s/a/d still make the 3D scene move. What I want is to make the 3D don't excute when I make the focus on textbox by the side or do something else. How to control focuse on or off on viewer in the same html file

no body know that? thankyou