- <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>
服务器之家 > 正文
- <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>