用于显示和QUOT方法;装载"信息 [英] Method for displaying "loading" message

查看:116
本文介绍了用于显示和QUOT方法;装载"信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery和的getJSON方法,我想知道是否有一种方法来显示一个消息,说加载它加载我的内容之前。我知道有jQuery的Ajax调用还有就是前提交的回调,你可以有一些东西,但的getJSON只有像三个选项。

I am using jquery and the getJSON method and I am wondering if there is a way to display a message saying loading before it loads my content. i know with the jquery ajax calls there is the before submit callbacks where you can have something but the getJSON only has like three options.

任何想法?

推荐答案

阿贾克斯之前和成功的事件,你可以触发自定义。

there is the custom .ajax "before" and "success" events which you can trigger.

不过通常情况下,你只需做一些像

Normally however, you would just do something like


  showLoadingAnimation(); 
  $.getJSON(  ..... function(){
      dontShowLoadingAnimation(); 
  }); 

或类似的东西。

or something similar.

您的问题是,但是有些vauge,它很难确定什么是你想做的事,你会不会已经能够用JavaScript做简单的。

Your question is however somewhat vauge, and its hard to ascertain what it is you want to do that you wouldn't already be able to do simply with javascript.

这篇关于用于显示和QUOT方法;装载"信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆