日期:2014-05-17 浏览次数:20641 次
<script type="text/javascript"> var str = "How are you doing today"; var strAry = new Array; strAry = str.split(" "); alert(strAry); </script>
------解决方案--------------------
<script> var s = "how are you"; var vs = s.split(" "); for(var i = 0; i < vs.length; i++){ alert(vs[i]); } </script>