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

由於加上alert就必需要走此方法,下面的代碼也就跟着執行了javascript

解決方法:加延遲事件java

setTimeout(function(){
  destory();
  //提交表單以後進行父頁面的刷新
  $navTab.refreshCurrentTab();
},100);
//在頁面或窗口關閉的時候,經過監聽頁面或窗口事件,在函數裏面銷燬富編輯器
    function destory(){
        if(typeof(UE.getEditor("editor")) !='undefined'){
            UE.getEditor("editor").destroy();
        }
    }
相關文章
相關標籤/搜索