2 你用new ActivexObject("Word.Application")一下,或是其他什么的ActiveX,比如FSO啊,在try{}catch(e){ if (e.message == "Automation服务器不能自动创建对象") ...}这个方法应该能解决是否打开ActiveX权限了
至于问题4,我给你我的代码,是仿照人家的思想写的:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>检测被拦截窗口(转录他人程序)</title>
<script language="javascript">
/*
---------------------------------
Description: Check the whether the
pop-up window is
available
---------------------------------
2004/9/1 new program zhj
*/
function OnLoad_WelcomePage()
{
//Error Flag 0:successed 1:failed...
var eF=0;
//the first test window to check
var popWin = window.open("","ptest","width = 0,height = 0,left = 5000,top = 5000",true);
// the sencond test window to check
var pW = window.open("","ptest","width = 0,height = 0");
//check whether two window has the same handle.
eF = (pW == popWin) ? 0 : 1;
//close two window now...
if (popWin != null){
popWin.close();
pW.close();}
else{
eF = 1;}
//if tP = 0 then the pop-up window is not available...
if ( eF == 1 )
return false;
else
return true;
}
</script>
</HEAD>
<body onload="alert(OnLoad_WelcomePage()?'ok,the pop-up window is available':'No,the pop-up window is unavailable');">
</body>
</HTML>