我有2個項目。首先是GWT項目從JavaScript中調用GWT函數(在IE中發佈)
public class Ecoverage implements EntryPoint {
public void onModuleLoad() {
Ecoverage.publish();
}
public static void getPayloadPage01() {
Window.alert("alert from GWT module");
}
public static native void publish() /*-{
$wnd.initPage01 = $entry(function() {
@com.apps.client.Ecoverage::getPayloadPage01()();
});
}-*/;
}
第二個是常規的動態web項目與jsp。
的Page1.jsp
<head>
<script language="javascript">
window.onload = function() {
window.initPage01();
};
</script>
<script type="text/javascript" language="javascript" src="../Ecoverage/ecoverage/ecoverage.nocache.js"></script>
</head>
彈出窗口是工作在FF和鉻罰款,但不是在IE瀏覽器。 IE說
Message: Object doesn't support this property or method
Line: 18
Char: 3
Code: 0
URI: http://10.0.2.2:8080/ecoverage-light/page1.jsp
第18行是:window.initPage01();
讓我知道有沒有IE的任何解決方法。
它只是爲了測試,我會打電話給RPC服務的JSP頁面加載後。 – YNChumak