在项目中修改其他同事的bug,发现在IE11上不兼容,会提示js之类的错误,删除一个元素,结果多个一起被删除,因为引用地址找不到了。

之前的代码

子页面保存的时候触发,找父页面的窗体内容

 1 function save(){
 2 var productEditPage = $(parent.document).contents().find("#layui-layer-iframe" + parent.layerIndex)[0].contentWindow;
 3 var selections = getAllSelections();
 4 $(selections).each(function (index, e) {
 5 productEditPage.productSchemeData.productSchemeBom.push(e);  //父页面的对象
 6 });
 7 productEditPage.loadBom();
 8 delete parent.layerIndex;
 9 var index = parent.layer.getFrameIndex(window.name);
10 parent.layer.close(index);
11 }
View Code

相关文章:

  • 2019-09-02
  • 2021-09-16
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2021-07-24
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
相关资源
相似解决方案