简体   繁体   中英

$.ajax accessing outside variable in success:

As title in example:

Outside of tabify():

var abc=1;  //pass from here

This part was calling in tabify():

$.ajax({

success:
        //get abc here if possible???
});

Is there by any chance to reach var abc when it is outside of $.ajax() ? Failed to access still don't know where to debug...

Yes. Just use it, and don't override it with another version with a narrower scope.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM