如果它是单个div,并且您希望使用加载消息/指示符更新其内容,则可以这样进行:
$("#content").html('<strong>Loading...</strong>') .load("/content/" + loadName + ".php");除非您为 所有的 ajax调用提供一个公共的加载指示器,否则我不会使用
ajaxStartand和
ajaxStop/
ajaxComplete
global事件。也就是说,可以按照以下步骤进行操作: __
$("#loading").bind("ajaxStart", function(){ $(this).show();}).bind("ajaxStop", function(){ $(this).hide();});其中的
loading元素是您想要在ajax调用期间显示的元素。



