code: function parseAttr(idinput, attrs) {
      attrs = attrs.split(/\s+/);
      // console.log(attrs);
      var attrArr = [];
      var idArr = [],
          classArr = [];
      attrs.forEach(function(attr) {
          if (!!~attr.indexOf('=')) {
              attrArr.push(attr);
          } else if (attr) {
              var ids = attr.split(/[#|.]/);
              // console.log(attr);
              ids.forEach(function(v) {
                  if (v !== '') {
                      (new RegExp('\\#' + v)).test(idinput) && idArr.push(v);
                      (new RegExp('\\.' + v)).test(idinput) && classArr.push(v);
                  }
              });
          }
      });
  
      var attr = '';
      var arr = [];
      if (idArr.length > 0) {
          arr.push('id="' + idArr.join(' ') + '"');
  
      }
      if (classArr.length > 0) {
          arr.push('class="' + classArr.join(' ') + '"');
      }
      if (attrArr.length > 0) {
          arr.push(attrArr.join(' '));
  
      }
      attr = arr.join(' ').replace(/&#39;/g, '\'')
          .replace(/&quot;/g, '"')
          .replace(/&gt;/g, '>')
          .replace(/&lt;/g, '<')
          .replace(/&amp;/g, '&');
      return attr;
  }
docs: 解析自定义属性
  @param  {[type]} idinput [description]
  @param  {[type]} attrs   [description]
  @return {[type]}         [description]