<script type="text/javascript"> var sentence = "the quick brown fox jumped over the lazy dog"; var words = sentence.split(" "); for ( var i = 0; i < words.length; ++i) { document.write("word " + i + ": " + words[i]+"<br />"); } </script>
时间: 2024-11-03 01:25:09