好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

JS中正则将首字单词转成大写

<script language= "JavaScript" >  <!--   var  str= "xi nan shi you xue yuan china people"   alert(str.replace(/\s[a-z]/g, function ($1){ return  $1.toLocaleUpperCase()}).replace(/^[a-z]/, function ($1){ return  $1.toLocaleUpperCase()}))   //-->  </script>    

查看更多关于JS中正则将首字单词转成大写的详细内容...

  阅读:44次