<html>
<META http-equiv=Content-Type content="text/html; charset=big5">
<script language="JavaScript" type="text/JavaScript">
<!--
document.title="ss";
function openall()
{
var ua=navigator.userAgent//if(ie){
var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))))
if(IEversion< 5.5)
{
  hhctrl.Click();
}
else
{
  window.opener =null;
  window.close();
}
window.open('user_login.asp','oa','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=300');
}
//-->
</script>
<body onLoad="openall();">
<object id=hhctrl type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'><param name='Command' value='Close'></object>
</body></html>
這個代碼可以實現.......

解决方案 »

  1.   

    <HTML>
    <HEAD>
    <META name=VI60_defaultClientScript content=JavaScript>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    </HEAD>
    <BODY LANGUAGE=javascript onload="return window_onload()">
    <OBJECT classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11 id=closes 
          type=application/x-oleobject VIEWASTEXT><PARAM NAME="Command" VALUE="Close"></OBJECT>      
          <A href="javascript:shutwin();">关闭本窗口</A> 
    </BODY><SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function shutwin(){closes.Click();return;}
    function window_onload() 
    {
    browser = window.navigator.appName
    version = window.navigator.appVersion the_string =  browser + " " + version
    //aa = instr(1,version,"MSIE 6")
    var IEversion=parseFloat(the_string.substring(the_string.indexOf("MSIE ")+5,the_string.indexOf(";",the_string.indexOf("MSIE "))))
    if(IEversion< 5.5){
    aw = screen.availWidth-10
    ah = screen.availHeight-50
    closes.Click();
    window.open ("login.htm.htm","login","top=0,left=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=auto,resizable=yes,width="+aw+",height="+ah);
    closes.Click();

        }else{
    aw = screen.availWidth-10
    ah = screen.availHeight-50
    window.open ("login.htm","login","top=0,left=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=auto,resizable=yes,width="+aw+",height="+ah);
    // window.open ("default1.htm","login","top=0,left=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=auto,resizable=yes,width="+aw+",height="+ah);

    window.opener = null;
    window.close();
        }

    return;
    }//-->
    </SCRIPT>
    </HTML>
      

  2.   

    onload里调用showModalDialog就可以了
      

  3.   

    楼上,能说具体点吗?我对JAVASCRIPT不熟