案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<body>
3
4
<script type="text/javascript">
5
6
name = 'aaa bbb ccc';
7
8
uw=name.replace(/\b\w+\b/g, function(word){
9
    return word.substring(0,1).toUpperCase()+word.substring(1);}
10
    );
11
12
document.write (uw);
13
14
</script>
15
16
</body>
17
</html>
18