解决方案 »

  1.   

    我今天也发现这个问题,Uncaught TypeError: undefined is not a function 
    网上搜了半天都是说获取不到返回值的问题
      

  2.   

    我也遇到这问题了,换了个系统,装了新的chrome,以前的项目showModelDialog弹不出来了,Uncaught TypeError: undefined is not a function 
      

  3.   

    谷歌发布Chrome 37浏览器  
    Chrome 37禁用对showModalDialog的默认支持。
    http://www.cfan.com.cn/2014/0827/110332.shtml  
      

  4.   

    Chrome 37+ 中 showModalDialog 被停用的临时解决方案
    http://tech.ddvip.com/2014-09/1409631962212990.html
    感觉还是用div构造自己的模拟窗口
      

  5.   

    if(navigator.userAgent.indexOf("Chrome") >0 ){
    var winOption = "height="+height+",width="+width+",top=50,left=50,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=0";
         return  window.open(url,window, winOption);
    }
    else{
        return window.showModalDialog(url, window, 'dialogHeight: ' + height + 'px; dialogWidth: ' + width + 'px;edge: Raised; center: Yes; help: Yes;scroll:no; resizable: no; status: no;resizable:yes');
    }   判断下,假如是Chrome浏览器用open 打开就可以了。解决
      

  6.   

    你不要骗我 return  window.open()