window.showModalDialog 在谷歌Uncaught TypeError: undefined is not a function

调用方法的变量未定义

Chrome 37+禁用对showModalDialog的默认支持。

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');
}  
时间: 2024-08-03 15:13:07

window.showModalDialog 在谷歌Uncaught TypeError: undefined is not a function的相关文章

JS报错 Uncaught TypeError: undefined is not a function,解决

Chrome调试报错:Uncaught TypeError: undefined is not a function,所有的数据都显示不出来 原因正如错误提示:调用了一个没有定义的方法,实际是一个空值调用了一个jq方法,导致报错 ☆解决方法:在调用方法之前判断值是否为空,不为空才调用方法,参考代码如下: if( d!="" && d.gblen()>My.option.colModel[i].len) { hide+=' relative'; d=getShort

Uncaught TypeError: $(...).tmpl is not a function(…)

当程序报错:Uncaught TypeError: $(...).tmpl is not a function(…) 首先,需要引入juqey和tmpl:http://pan.baidu.com/s/1kVDarK7,密码:rtua 然后,注释掉@Scripts.Render("~/bundles/jquery")

Uncaught TypeError: download is not a function at HTMLAnchorElement.onclick (index.html:25)

前段时间调试html报了这样的一个错误 Uncaught TypeError: download is not a function     at HTMLAnchorElement.onclick (index.html:25) 我的html 代码为 <a href="javascript:void(0)" class="down_btn downloadButton" onclick="download()"></a>

js.live方法无效, 报错:uncaught TypeError: $(...).live is not a function

前段时间在网上COPY了一个js效果,需要引用jQuery 1.9.1.min.js,之前项目中引用的是jQuery 1.5.1.min.js 然后发现代码中一些动态生成的元素有用到 live的方法全部都失效,调试发现Js报错:uncaught TypeError: $(...).live is not a function 网上一查原来是 Query 1.9 比之前的版本做了很大的调整,很多函数都不被支持 live()方法已经失效,需要改成以下方式 $('#id').on("click&quo

浏览器提示Uncaught TypeError: object is not a function XXX onclick

我在做复选框选中的测试时,做了全选和反选的设置,点击后触发onclick事件在javascript里面进行处理. 刚开始一切都正常,可是后来发现javascript里面的函数不能执行了也就是onclick="chooseOther()" 点击后无效,改来改去还是无效. 后来通过浏览器的调试功能(google 按F12),点击后提示|<input type="checkbox" id="chooseOther" name="choo

出现TypeError: &#39;undefined&#39; is not a function (evaluating &#39;$&#39;)错误

今天周天,要加班.来公司后,遇到一个问题,如题, TypeError: 'undefined' is not a function (evaluating '$') 然后遇到这个问题,属于js问题,根据以往的经验,首先要看js语法有没有错误,查看了下,没有错误. 最后,就要考虑是不是没有导入jquery包,发现确实没有导入:<script src="${webAppUrl}/common/scripts/jquery.easyui.min.js" type="text/

[Sencha ExtJS] 关于build production后,浏览器运行报错&#39;Uncaught TypeError: c is not a function&#39;

原文:http://blog.csdn.net/lovelyelfpop/article/details/51328783 估计很多人用 ExtJS6 + Sencha Cmd 6 的时候,遇到过一种情况:开发的时候明明正常的,build之后运行就报了下面的错误 Uncaught TypeError: c is not a function 心里一万个草泥马奔腾:What the hell is this?(这TM什么JB玩意?) 其实根本原因是你忘记了requires某个类导致的. 比如你这样

控制台报错 Uncaught TypeError: $(...).tap is not a function

使用zepto报错 Uncaught TypeError: $(...).tap is not a function 我加载了一下插件 <script src="js/zepto.js"></script><script src="js/event.js"></script><script src="js/touch.js"></script><script src=&

Google Chrome Uncaught TypeError: object is not a function

<html> <script type="text/javascript"> function testForm(){ alert("hello world ! "); } </script> <body> <form name="testForm" action="" > <input type="button" onclick="