When data is retrieved from remote
servers (which is only possible using
the script or jsonp data types), the
operation is performed using a
tag rather than an
XMLHttpRequest object. In this case,
no XMLHttpRequest object is returned
from $.ajax(), and the XMLHttpRequest
object and the textStatus arguments
passed to the handler functions such
as beforeSend will be undefined. The
error callback will never be fired for
JSONP requests.

The same question is asked at the jQuery forums ajax:beforeSend for jsonp requests don't fire

The question's status is Status : Working on it. So it might be there at a future release.

And as Mike Alsups noted

I would name than function something
other than 'beforeSend' since the
semantics are not the same.

Also related : jsonp is not firing beforeSend?

Cannot use beforeSend with jsonp. Period.

网友答案:

you can use this code:

befor $.ajax put it, and you should have an image(or div,span ,...) loading with "div_loading" id.