我有一个使用jQuery1.7的旧网站,直到两天前还可以正常运行.突然,我的一些按钮不起作用了,点击它们后,我在控制台上得到了以下警告:
表单深渊翻滚已取消,因为该表单未连接
The code behind the click is something like this:
this.handleExcelExporter = function(href, cols) {
var form = $('<form method="post"><input type="submit" /><input type="hidden" name="layout" /></form>').attr('action', href);
$('input[name="layout"]', form).val(JSON.stringify(cols));
$('input[type="submit"]', form).click();
}
似乎Chrome56不再支持这种代码了.难到不是么?如果是,我的问题是:
- 为什么事情突然发生了?没有任何反对警告?
- What is the workaround for this code?
- 有没有办法在不更改任何代码的情况下强制Chrome(或其他浏览器)像以前一样工作?
P.S.个 它在最新的Firefox版本中也不起作用(没有任何消息).它也不能在IE 11.0&;Edge中工作!(两者均无任何信息)