When using ajax to call an URL with dataType HTML, the response includes two parts such as accesstoken=1&expires=452. In this scenario, only the access token is needed. Using alert(response) displays both parts. How can the access token be extracted? The function being used is:
$.ajax({
type:"POST",
url:theUrl,
dataType:"html",
success:function(res){
alert(res);
}
});