复制代代码如下: <br>var paypopupURL = "http://www.jb51.net"; <br>var randkey = '13'; //IE 関数をバイパスします <br>function setupActiveX(){ <br>document.write(' <INPUT ID="autoHit" TYPE="TEXT" ONKEYPRESS="showActiveX()">'); <br>} <br>function openActiveX(){ <br>document.getElementById('autoHit').fireEvent("onkeypress",(document.createEventObject().keyCode=escape(randkey).substring(1))) ; <br>} <br>function showActiveX(){ <br>var newWindow=window.open(paypopupURL,'abcdefg','width=200,height=200,top=50,left=' (screen.width-250 )); <br>} <br>setupActiveX(); <br>openActiveX(); <br>self.focus(); <br>