code: function mergeAttr(oldAttr, newAttr) {
      if (!oldAttr) {
          return newAttr;
      }
      if (!newAttr) {
          return oldAttr;
      }
      //合并class style
      var oldAttrs = String(oldAttr).split(/\s+/);
      var newAttrs = String(newAttr).split(/\s+/);
      var old = {},
          inew = {};
      var back = [];
      oldAttrs.forEach(function(a) {
          var v = a.split('=');
          v[0] = v[0].toLowerCase();
          if (v[0] === 'class' || v[0] === 'style') {
              old[v[0]] = v[1].slice(1, -1).trim();
          } else {
              back.push(a);
          }
      });
      newAttrs.forEach(function(a) {
          var v = a.split('=');
          v[0] = v[0].toLowerCase();
          if (v[0] === 'class' || v[0] === 'style') {
              inew[v[0]] = v[1].slice(1, -1).trim();
          } else {
              back.push(a);
          }
      });
      ['class', 'style'].forEach(function(v) {
          //两个都存在，则合并之
          switch (v) {
              case 'class':
                  back.push('class="' + [old[v] || '', inew[v] || ''].join(' ').trim() + '"');
                  break;
              case 'style':
                  back.push('style="' + [old[v] || '', inew[v] || ''].join(';') + '"');
                  break;
          }
      });
      return back.join(' ');
  }
docs: 合并attr
  @param  {string} oldAttr 老属性
  @param  {string} newAttr 新属性
  @return {[type]}         [description]