我有一个PHP页面里面大量数据,因为执行需要1-5分钟,所以我想做个人性化的提示告诉用户用户继续等待,请问怎么处理哇?当加载完了,我就把这个提示关了。
解决方案 »
- 谁熟悉PHP XML DOMDocument 过来帮帮忙
- fsockopen,fopen,file_get_contents的问题
- 有没有大陆和香港的IP数据库?(只用于大陆和香港的位置判断,不用精确,QQ纯真的数据太多了)
- 如何可以隐藏输出的内容
- 求字符串连接函数
- 大家能否帮小弟看下这个问题吗?
- 新手问题:一段代码
- 为什么会Call to undefined function: assign()错误。。
- php require 多重包含路径的问题
- SAE怎样调用数据库以实现微信公众平台数据库关键词回复?
- 请问有人用php开发过mis系统吗?
- php?action=中是用switch还是if???
var http_request=false;
function send_request(url){//初始化,指定处理函数,发送请求的函数
http_request=false;
//开始初始化XMLHttpRequest对象
if(window.XMLHttpRequest){//Mozilla浏览器
http_request=new XMLHttpRequest();
if(http_request.overrideMimeType){//设置MIME类别
http_request.overrideMimeType("text/xml");
}
}
else if(window.ActiveXObject){//IE浏览器
try{
http_request=new ActiveXObject("Msxml2.XMLHttp");
}catch(e){
try{
http_request=new ActiveXobject("Microsoft.XMLHttp");
}catch(e){}
}
}
if(!http_request){//异常,创建对象实例失败
window.alert("创建XMLHttp对象失败!");
return false;
}
}
//处理返回信息的函数
function processrequest(){
if(http_request.readyState==4){//判断对象状态
if(http_request.status==200){//信息已成功返回,开始处理信息
document.getElementById('re').innerHTML=http_request.responseText;
}
else{//页面不正常
alert("您所请求的页面不正常!");
}
}
}
function check(){
var f=document.send1;
var uname=f.companyid.value;
if(uname == ""){
document.getElementById('re').innerHTML='企业码不能为空!';
f.companyid.focus();
return false;
}
else{
document.getElementById('re').innerHTML='正在读取数据…';
var companyid=document.send1.companyid.value;
var queryString="companyid="+companyid;
send_request();
http_request.open("POST","modules/Company/RegisterInfo/checkuserreg.php",true);
http_request.onreadystatechange=processrequest;
http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
//确定发送请求方式,URL,及是否同步执行下段代码
//http_request.open(”GET”,url,true);
http_request.send(queryString);
}
}
</script>
以前写过的一个例子 re是一个div 负责显示文字 你可以把它改成图片 交互完成 灭掉就可以了document.getElementById('re').innerHTML='正在读取数据…';