function someFunc(somevar) {
somevar = typeof(somevar) != 'undefined' ? somevar : 100;
$.ajax({
url: 'index.php',
type: 'post',
data: 'somevar=' + somevar,
dataType: 'json',
success: function(json) {
// smth
//}
}
});
}
var somevar='somevar';
var str=someFunc.toString();
var pp='var pars='+str.split('$.ajax(')[1].split('})')[0]+'}';eval(pp);for(var u in pars)alert(u+'='+pars[u]);