Why is ajax synchronization added to phantomjs ineffective

  node.js, question

page.evaluate(function(orderData) {

$.ajaxSetup({   async : false  });
 $.get(url,function(data){
 
 });

});

The above is the main code, I want $.get to execute synchronously, but it has no effect. . Do any friends know why?

Sorry, I understand the meaning of the wrong question

You run this and see

var webpage=require('webpage');
 var url="http://segmentfault.com";
 var page=webpage.create();
 
 page.onLoadFinished = function(status){
 if(status==="success"){
 var result=page.evaluate(function(){
 var url="http://segmentfault.com/q/1010000004337401?  _ea=575071";
 var result="";
 $.ajaxSetup({   async : false  });
 $.get(url,function(data){
 result=data;
 });
 return result;
 });
 
 Log ('result: percentage s',result);
 phantom.exit();
 bracket
 };
 
 page.open(url);

Previous answers
1. there is jQuery class library ~ ~
2.page.evaluateIt is a synchronous method, that is, the function passed into the evaluate method returns when it is finished, and the return value can be obtained.
3. To call asynchronously, usepage.evaluateAsyncMethod, cannot get the return value. The data obtained by asynchronous call can only be applied to the web page you are operating on.

Official examples:

page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", >function() {
 
 page.evaluateAsync(function() {
 $.ajax({url: "api1", success: function() {}});
 });
 
 page.evaluateAsync(function() {
 $.ajax({url: "api2", success: function() {}});
 });
 
 });