请问怎么用XAJAX实现loading...效果?

mojojojo 2006-11-20 01:00:38
同上...
...全文
566 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
iasky 2006-12-07
  • 打赏
  • 举报
回复
xajax.sf.net
resonru 2006-12-06
  • 打赏
  • 举报
回复
那请问一下

require("xajax.inc.php");

这是哪里来的呢?
mojojojo 2006-11-26
  • 打赏
  • 举报
回复
唉...
malshow 2006-11-24
  • 打赏
  • 举报
回复
innertext = 'loading<marquee>...</marquee>';
mojojojo 2006-11-22
  • 打赏
  • 举报
回复
我在网上找到下面的例子:因为他是为了测试用的,所以他用了sleep(2),就是停了2秒什么都不做,现在想换成当数据载入完成时再结束loading...应该怎么做才好一点呢?谢谢 。。




<?php

require("xajax.inc.php");



function slow_function()

{

$objResponse = new xajaxResponse();

sleep(2); //we'll do nothing for two seconds

$objResponse->addAlert("All done");

return $objResponse;

}



$xajax = new xajax();

$xajax->registerFunction('slow_function');

$xajax->processRequests();

?>

<html>

<head>

<title>Loading Bar Demo</title>

<? $xajax->printJavascript(); ?>

</head>

<body>

<script type="text/javascript">

<!--

xajax.loadingFunction =

function(){xajax.$('loadingMessage').style.display='block';};

function hideLoadingMessage()

{

xajax.$('loadingMessage').style.display = 'none';

}

xajax.doneLoadingFunction = hideLoadingMessage;

// --></script>

<input type="button" onclick="xajax_slow_function();" value="Slow Function" />

<div id="loadingMessage" style="font-size: 22px; display: none;">

Loading...

</div>

</body>
Contp 2006-11-22
  • 打赏
  • 举报
回复
帮顶...
倪蝶 2006-11-21
  • 打赏
  • 举报
回复
遇到同样的问题,帮顶!.....
mojojojo 2006-11-20
  • 打赏
  • 举报
回复
楼上的楼上说的是在JS下面写吗?
懒得去死 2006-11-20
  • 打赏
  • 举报
回复
看一下registerPreFunction
懒得去死 2006-11-20
  • 打赏
  • 举报
回复
if (http.readyState = 1)
document.getElmentById(...).innertext = 'loading...';
poiu_poiu 2006-11-20
  • 打赏
  • 举报
回复
不知道

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧