我在戰爭中的文件夾有一個形象。我試圖看看圖像是什麼,但我無法讓它工作。我嘗試通過使用GWT.getModuleBaseURL()
但它不警報。GWT的getURL不返回圖像
if(soundImage.getUrl().equals(GWT.getModuleBaseURL()+"/soundOn.png")){
Window.alert("YEP IT DOES");
soundImage.setUrl("soundOff.png");
setSound("off");
}else{
soundImage.setUrl("soundOn.png");
setSound("on");
}
如何獲取圖像?我在代碼中忽略了某些東西,還是我做錯了?