字符串 转 驼峰字符
1 <script type="text/javascript"> 2 3 var str = 'peng-hui-datou'; 4 function a(str){ 5 var Array = str.split('-'); 6 for(var i=0;i<Array.length;i++){ 7 Array[i] = Array[i].charAt(0).toUpperCase() + Array[i].substring(1); 8 } 9 var newArray = Array.join(''); 10 11 } 12 <script >