在页面内容之前加载页面提示 [英] loading page prompt before page content
本文介绍了在页面内容之前加载页面提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好;
我正在尝试使用DIV和函数来控制页面内容的加载。任何人都可以给我一个关于如何做到这一点的快速教程。
示例:
如果用户点击主页面上的GO按钮,将会出现一个新窗口弹出并显示一个loading.gif,比方说20秒然后它将消失,页面的实际内容将显示..
我是初学者我是听说我可以用ajax但我不想用它。
非常感谢...
hi everyone;
I am trying to use DIV and function to control the loading of my page content. Can anyone provide me a quick tutorial on how to do this.
Example:
If user click the GO button on the main page, a new window will pop up and a loading.gif will appear for let say 20 seconds then it will disappear and the actual content of the page will display..
I am a beginner and I''ve heard I can use ajax but i don''t want to use it.
thanks so much...
推荐答案
嗨....
欢迎来到剧本...
为什么你不想使用ajax? :) ...无论如何......你可以制作一个有两个iframe的页面......一个显示你的加载指示器,另一个加载内容页面。第二个iframe应该有 style =" display:none" 起初......所以它是隐藏的。在你给定的时间之后(你可以在这里使用 window.setTimeout())你隐藏loading-indicator-frame并用 style =" display:block"显示content-iframe。 ...
亲切的问候
hi ....
welcome to theScripts ...
why don''t you want to use ajax? :) ... anyway ... you could make a page with two iframes ... one shows your loading-indicator the other loads the content-page. the second iframe should have style="display: none" at first ... so it is hidden. after your given time (you may use window.setTimeout() here) you hide the loading-indicator-frame and show the content-iframe with style="display: block" ...
kind regards
您可以使用这个让你开始用setTimeout替换body onload overlay调用。
You can use something like this to get you started replacing the body onload overlay call with setTimeout.
感谢你的回复,但我可以似乎没有工作......这里是我的代码:
[HTML]< head>
< title>< ; fmt:message key =" study.viewDataResult" />< / title>
< script type =" text / javascript">
function overlay(){
elem = document.getEmlementbyId(" data");
elem.style.visibility =" hidden";
elem = document.getElementById(" load");
elem.style.visibility =" visible";
}
< / script>
< / head>
< body>
< body onload =" overlay()">
< c:set var =" showTopLinks"值= QUOT; 0" scope =" session" />
< c:set var =" showBg"值= QUOT; 0" scope =" session" />
< table width =" 100%">
< tr>
< td>
< font class =" welcomeText">
< fmt:message key =" study.viewData.Result" /> < c:out value ="
thanks for the reply however i can''t seem to get it to work.. here''s my code:
[HTML]<head>
<title><fmt:message key="study.viewDataResult"/></title>
<script type ="text/javascript">
function overlay() {
elem = document.getEmlementbyId("data");
elem.style.visibility="hidden";
elem = document.getElementById("load");
elem.style.visibility ="visible";
}
</script>
</head>
<body>
<body onload="overlay()">
<c:set var="showTopLinks" value="0" scope="session"/>
<c:set var="showBg" value="0" scope="session"/>
<table width="100%">
<tr>
<td>
<font class="welcomeText">
<fmt:message key="study.viewData.Result"/> <c:out value="
这篇关于在页面内容之前加载页面提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文