js中加上alert()就成功执行,不加执行就不成功

由于加上alert就必需要走此方法,下面的代码也就跟着执行了javascript

解决方法:加延迟事件java

setTimeout(function(){
  destory();
  //提交表单以后进行父页面的刷新
  $navTab.refreshCurrentTab();
},100);
//在页面或窗口关闭的时候,经过监听页面或窗口事件,在函数里面销毁富编辑器
    function destory(){
        if(typeof(UE.getEditor("editor")) !='undefined'){
            UE.getEditor("editor").destroy();
        }
    }
相关文章
相关标签/搜索