欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程语言 > php >内容正文

php

ajax加载进度百分比,在ajax中显示加载百分比的进度条,php

发布时间:2025/3/8 php 49 豆豆
生活随笔 收集整理的这篇文章主要介绍了 ajax加载进度百分比,在ajax中显示加载百分比的进度条,php 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

您好我正在使用ajax加载数据库内容。我想显示加载或图像的总百分比。在ajax中显示加载百分比的进度条,php

这是我的脚本

function name1(str)

{

if (str.length==0)

{

document.getElementById("txtHint").innerHTML="";

return;

}

if (window.XMLHttpRequest)

{// code for IE7+, Firefox, Chrome, Opera, Safari

xmlhttp=new XMLHttpRequest();

}

else

{// code for IE6, IE5

xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

}

xmlhttp.onreadystatechange=function()

{

if (xmlhttp.readyState==4 && xmlhttp.status==200)

{

document.getElementById("txtHint").innerHTML=xmlhttp.responseText;

}

}

xmlhttp.open("GET","user.php?q="+str,true);

xmlhttp.send();

}

user.php的Q = RAM,它传递一个值。而取从数据库 数据如何修改AJAX来显示图像加载

2012-02-21

Vineeth

总结

以上是生活随笔为你收集整理的ajax加载进度百分比,在ajax中显示加载百分比的进度条,php的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。