最近在维护一个老项目,之前都是用IE来调试代码的.今天想着测试一下项目的兼容性,就用了谷歌浏览器,然后就遇到这样一个问题:一段用showModalDialog实现弹出模态框和返回值的js代码,在调试时报出了下面这个错误: Uncaught TypeError: window.showModalDialog is not a function 一开始怎么都想不通,明明以前都是可以正常打开的,为什么现在就不行了呢……然后一查才知道,原来是Chrome 把对showModalDialog的支持去掉了(…
问题重现 弹出窗口编码: JavaScript 0 1 2 3 4 5 6 7   var obj = new Object();   var retval = window.showModalDialog("request.aspx",obj,"dialogWidth=500px;dialogHeight=300px"); if (retval == null) { ... }else { ... } 浏览器异常: Shell 0 1   Uncaught Typ…
今天提交代码,push到GitHub上,突然出现这个问题. remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operatio…
接管别人的项目,因开发时用了showmodaldialog 导致最近很多用户chrome升级到最新之后 就无法弹窗了.原因是新版chrome[37+]不再支持showmodaldialog. showmodaldialog 并不是W3C标准内的方法,起源于IE, 当是低版本的firefox也是不支持的,后来不知怎么了又纳入了这个方法.貌似opera和safari都不支持.随着web标准的日益规范化,估计Firefox 和 IE都不会再支持它了.所以建议经常使用它做数据交互的同学可以抛弃它了,改用…
中文版Chrome浏览器不支持12px以下字体的解决方案 Chrome 27之前的中文版桌面浏览器会默认设定页面的最小字号是12px,英文版则没有限制,主要是因为chrome认为汉字小于12px就会增加识别难度,尤其是中文常用的宋体和微软雅黑.而我们在实际项目中,对于数字/英文内容,其他字体的文本可能会有特殊的需求要求它们以更小的字号来显示,这个时候就需要取消浏览器的自动调整功能了. 一般解决方案是禁止webkit浏览器配置调整网页的字体大小.如下CSS定义方式: [css] view plai…
平常的网站中,有时我们会希望使用者按下按钮后开启一个保持在原窗口前方的子窗口,在IE中,我们可以使用showModalDialog来达成,但是chrome早就不支持showModalDialog,最近我的火狐也不支持了,所以就去网上找了下解决办法,与大家共享: 原来代码是这样: function showDialog(url, w, h){ showModalDialog(url, self, 'dialogWidth='+w+'px;dialogHeight='+h+'px');} 然后为了兼…
父窗体部分js代码: var returnValue = window.showModalDialog("son.html ", window); //for chrome if (returnValue == undefined) { returnValue = window.returnValue; } 子窗体部分js代码: if (window.opener != undefined) { //for chrome window.opener.returnValue = &quo…
window.applicationCache事件,最新chrome浏览器已经不能判断是否支持html5: 之前,在IE和Google中 为ApplicationCache对象,而在FF中为 OfflineResourceList对象: 现在已经不能判断, if(window.applicationCache){ next(); }else{ alert('该浏览器不支持html5'); }…
Hi Everyone,   Chrome 55 has removed the Encoding menu and Chrome will do auto-encoding detection now:   https://bugs.chromium.org/p/chromium/issues/detail?id=597488  -  Remove encoding menu   Manual encoding selection is not necessary any more as th…
chrome 等浏览器不支持本地ajax请求的问题 XMLHttpRequest cannot load file:///D:/WWW/angularlx/ui-router-test/template/content.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.…