[jQuery] How return value in jQuery ajax

[jQuery] How return value in jQuery ajax


i have function
jQuery.ajax({
type: "GET",
url: url,
data: queryString + '&btnSubmit=1',
success: function(msg)
{
if(msg=0){
if(msg)
{
$("#errorid").val("");
}
else
{
$("#email").val("");
document.getElementById("email").focus();
}
}
}
});
how to get msg in othe javascript function
function()
{
}
how can i use out of one function in other javascript function OR how
can i Stop one function from the other function