2
我的java Fx webview爲以下代碼拋出JS異常。任何人都能解釋我爲什麼?在java fx的webview中JSexception?
WebView webview = new WebView();
WebEngine webengine=webview.getEngine();
newtab.setText("Start Page");
newtab.setContent(webview);
editTabset.getTabs().add(newtab);
webengine.load("file:///E:/myproj/src/novuseditor/resources/html/clike.html");/*works till here*/
webengine.executeScript("document.getElementById('code').value=\"Hi\"");
/*exception:netscape.javascript.JSException: TypeError: 'null' is not an object */
哇,這解釋了很多東西......非常謝謝:) – 2012-04-05 12:52:26