Javascript 脚本5011:Can';t从释放的脚本执行代码
我看到了很多关于这种类型错误的帖子,但是在我的例子中,我 在函数中有一个对象,如下面的代码,我得到一个错误“无法从释放的脚本执行代码””Javascript 脚本5011:Can';t从释放的脚本执行代码,javascript,jquery,Javascript,Jquery,我看到了很多关于这种类型错误的帖子,但是在我的例子中,我 在函数中有一个对象,如下面的代码,我得到一个错误“无法从释放的脚本执行代码”” 在看到许多链接和博客后,我的结果是通过应用以下代码得到的 我的问题是,我发现我在对象中应用join(),但它在数组中应用,所以我首先 数组中的我的对象然后应用联接 function updateLetterOfClaim(thisletterClaimID) { var updatedLetter = {};
在看到许多链接和博客后,我的结果是通过应用以下代码得到的 我的问题是,我发现我在对象中应用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(', ');
}
让我们看看你的照片!您可以通过var a={0:'name',1:'name2'}进行测试;然后a.连接();在您的跑步鞋上进行简单跑步console@LightnessRacesinOrbit我找到了解决方案,谢谢你的支持
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(', ');
}