¡@

Home 

2014/10/16 ¤W¤È 12:05:46

jquery Programming Glossary: nice.jpg

In jQuery.post, how do I get value of variable outside function?

http://stackoverflow.com/questions/1904376/in-jquery-post-how-do-i-get-value-of-variable-outside-function

this question UPDATE When working with callback functions its important to pay attention to execution flow var img nice.jpg .post ' path' key value function data img newname.jpg alert img Alerts nice.jpg It is because any code occurring after the.. attention to execution flow var img nice.jpg .post ' path' key value function data img newname.jpg alert img Alerts nice.jpg It is because any code occurring after the callback but not in the callback function is executed first Set img to nice.jpg.. It is because any code occurring after the callback but not in the callback function is executed first Set img to nice.jpg Call .post Call alert Set img to newname.jpg Original answer If the code you are using exists exactly as you posted it then..