var params = attr.map(function(v, k) {
      return k + "=" + encodeURIComponent(v);
    }).join('&');