---
title: "jquery Ajax 实现加载数据前动画效果"
author: "geshenyi"
date: "2011-03-10T16:13:58Z"
tags: ["Ajax", "Cache", "HTML", "jQuery", "json"]
categories: ["Web前端"]
slug: "jquery-ajax"
draft: false
lastmod: "2011-03-10T16:15:47Z"
id: 952380
url: "https://geshenyi.iteye.com/blog/952380"
---

$(document).ready(function(){ $.ajax({ type:"get", cache:false, url:"ajaxpage.aspx?t=getcity", dataType:"json", beforeSend:function(){ $("#vvv").append('![](../../images/loading.gif)'); }, success:function(data){ $("#city").html(data.info);//添加下拉框的option }, complete: function() {$("#vvv").remove(); } }) }) \[b]http://www.sj33.cn/sc/GIF/200803/15016.html \[size=large]loading图片\[/size]\[/b]