Answer the question
In order to leave comments, you need to log in
How to substitute value in ajax request?
pliz tell me how to substitute a value from a variable in ajax and in general in js?
<script type="text/javascript">
var id = "2693258***"
$.ajax({
url : "https://api.vk.com/method/users.get?user_ids=+ id +",
type : "GET",
dataType : "jsonp",
success : function(profile){
console.log(profile.response[0]);
$('#profile').append(profile.response[0].uid);
}
});
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question