-1

我在此处此处看到了许多 有关此类型错误的帖子,但在我的情况下,我在函数中有一个对象,如下面的代码,我收到此错误“无法从已释放的脚本中执行代码

  function updateLetterOfClaim(thisletterClaimID) {

      var updatedLetter = {};

     updatedLetter.new_breaches = top.opener.selected_breach.join(",");//from this line in ie7 i get this error

     updatedLetter.new_causation = top.opener.selected_causation.join(",");

     updatedLetter.new_chronology = top.opener.chronology_records.join(",");

     updatedLetter.new_Injuries = top.opener.damage_records;
}
4

1 回答 1

0

在看到许多链接和博客后,我的结果来自应用以下代码

我的问题是我发现我在对象中应用了 join() 但它在数组中应用所以首先我做

我在数组中的对象然后应用加入 ....

 function updateLetterOfClaim(thisletterClaimID) {

            var updatedLetter = {};


            updatedLetter.new_breaches =joinobjects(top.opener.selected_breach);
            updatedLetter.new_causation =joinobjects( top.opener.selected_causation);
            updatedLetter.new_chronology =joinobjects(top.opener.chronology_records);
            updatedLetter.new_Injuries = joinobjects(top.opener.damage_records);
}

  function joinobjects(object){

            return $.map(object, function(v){
                        return v;
                    }).join(', ');
        }
于 2013-08-28T12:07:36.083 回答