2012-03-07 75 views

回答

0

使用BrowserFieldListener和在創建的類使用以下兩個功能:

public void documentCreated(BrowserField browserField, ScriptEngine scriptEngine, Document document) { 
    try{ 
     System.out.println("Document Created"); 
      UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { 
      Dialog.alert("Loading"); 
      }}); 
    } catch (Exception ex) { } 
} 

public void documentLoaded(BrowserField browserField, Document document) { 
    try { 
     System.out.println("Document loaded"); 
     UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { 
      Dialog.alert("Finished Loading"); 
      }}); 
    } catch (Exception ex) { } 
} 
+0

我沒有看到對話框...;( – 2012-03-07 13:07:12

+0

查看更新... – 2012-03-07 13:53:35

+0

也;不工作 – 2012-03-07 14:09:15