Javascript gxt加载片段
我在gxt应用程序上使用了该代码,以加载片段项:Javascript gxt加载片段,javascript,html,css,gwt,gxt,Javascript,Html,Css,Gwt,Gxt,我在gxt应用程序上使用了该代码,以加载片段项: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css" /> <link type="text/css" rel="stylesheet" h
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css" />
<link type="text/css" rel="stylesheet" href="MyApp.css">
<title>MyApp</title>
</head>
<body>
<style>
#loading {
position: absolute; left: 45%; top: 40%; padding: 2px;
margin-left:-45px; z-index:20001; border:1px solid #ccc;
}
#loading .loading-indicator {
background:#eef;font:bold 13px tahoma,arial,helvetica;
padding:10px;margin:0;height:auto;color:#444;
}
#loading .loading-indicator img {
margin-right:8px; float:left; vertical-align:top;
}
#loading-msg {font:normal 10px arial,tahoma,sans-serif;}
</style>
<div id="loading">
<div class="loading-indicator">
<img src="gxt/images/default/shared/large-loading.gif"/>
myCustomerContacts<br />
<span id="loading-msg">Loading application...</span>
</div>
</div>
<script type="text/javascript" language="javascript" src="myapp/myapp.nocache.js"></script>
</body>
</html>
MyApp
#装载{
位置:绝对;左侧:45%;顶部:40%;填充:2倍;
左边距:-45px;z指数:20001;边框:1px实心#ccc;
}
#装载指示器{
背景:#eef;字体:粗体13px塔荷马,arial,helvetica;
填充:10px;边距:0;高度:自动;颜色:#444;
}
#加载。加载指示器img{
右边距:8px;浮动:左侧;垂直对齐:顶部;
}
#正在加载消息{font:normal 10px arial,tahoma,sans serif;}
myCustomerContacts
正在加载应用程序。。。
为什么加载,为什么加载片段在加载应用程序时不停止?加载应用程序后,需要从DOM中删除加载div 可以这样做:
DOM.removeChild(RootPanel.getBodyElement(), DOM.getElementById("loading"));
以下是GWT团队的David Chandler对您正在尝试做的事情的一个很好的总结:尝试为您的问题添加更多信息。如果你能将代码减少到复制问题所需的最低限度,那么其他人就可以更容易地提供帮助。