whole_func_string: function loadImage(url, callback, error) {   
      var img = new Image();
      img.src = url; 
      if(img.complete){
        return callback(img);
      }
      img.onload = function(){
        img.onload = null;
        callback(img);
      };
      img.onerror = function(e){
        img.onerror = null;
        error(e);
      };  
    }
func_code_string: function loadImage(url, callback, error) {   
      var img = new Image();
      img.src = url; 
      if(img.complete){
        return callback(img);
      }
      img.onload = function(){
        img.onload = null;
        callback(img);
      };
      img.onerror = function(e){
        img.onerror = null;
        error(e);
      };  
    }
func_documentation_string: 图片预加载