本题有多种解法,发一种别人没发的,采用递归形式进行转换,第一个字符如果是-就不进行转换,特别注意
function cssStyle2DomStyle(sName) {
console.log(sName.indexOf('-'))
if (sName.indexOf('-') != '-1') {
let index = Number(sName.indexOf('-')),
Name;
let start = sName.substring(0, index),
content = sName.substring(index, index + 2),
end = sName.substring(index + 2);
console.log(start, content, end, content.substring(1, 2))

  if (index == 0) {
    Name = start + content.substring(1, 2) + end
  } else {
    Name = start + content.substring(1, 2).toUpperCase() + end
  }
  return cssStyle2DomStyle(Name)
} else {
  return sName
}

}