我如何读取 HTML 文件并使用其 css 和 Javascript 在 GWT 中显示内容
我只想读取 HTML 文件并在 GWT 小部件中显示其内容。我已经完成了,但我没有得到它的 css 和 javascript。那么有人可以帮我获取带有 css 和 javascript 的内容吗?
我尝试了以下代码,
public class FrameExample implements EntryPoint {
public void onModuleLoad() {
Frame frame = new Frame("http://www.google.com/");
RootPanel.get().add(frame);
}
}
我只得到了一个矩形框。但我没有得到预期的结果。你能帮助我吗?
I just want to read a HTML file and display its content in a GWT widget. Already I have done it but i'm not getting its css and javascripts. So can anyone help me to get the content with its css and javascripts?
I tried the following code,
public class FrameExample implements EntryPoint {
public void onModuleLoad() {
Frame frame = new Frame("http://www.google.com/");
RootPanel.get().add(frame);
}
}
I got a rectangular box only. But I don't get the expected result. Can you help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
忘记我所说的一切,您可以在这里找到答案!
(Iframe 不显示某些页面)
基本上:谷歌有一种机制来检测它是否是不托管在 iframe 中。这当然提出了一个问题,为什么他们在示例中使用它......
顺便说一句:像
http://en.wikipedia.com
这样的网站可以工作。Forget everything I said, you can get the answerer here!
(Iframe not displaying some pages)
Basically: google has a mechanism to detect if it is not hosted in a iframe. This of course raises the question why they us it in their examples.....
BTW: a site like
http://en.wikipedia.com
works.