<script language="javascript" type ="text/javascript"  >
var bLogged=window.showModalDialog("test.aspx");
</script>
提示:Microsoft JScript 运行时错误: 对象不支持此属性或方法。
请问是什么原因!

解决方案 »

  1.   

    字面意思,showModalDialog不是jscript内置函数,dom/bom也没这方法忘了引入外部js文件吧?
      

  2.   

    应该可以吧  <script>
        window.showModalDialog("a.html");
      </script>
    我试的可以啊
      

  3.   

    哪个浏览器下?
    另外 你是直接这样做的?在load的时候这样做的?
      

  4.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login1.aspx.cs" Inherits="Login1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title>login</title>
        <script >

        function startLogin(){

    var bLogged=window.showModalDialog("test.aspx");

    }
    </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        <script  language ="javascript" type ="text/javascript" >
    startLogin();

    </script>
        </div>
        </form>
    </body>
    </html>
    浏览器是ie8.
      

  5.   

    看来是我搞错了,测试后showModalDialog在ie6/ff4/chrome10都支持,opera11不支持……