<html>
<head><title></title>
<script language="JavaScript" type="text/javascript">
function sBP(){
var strings = myForm.inputVal.value.split(" ");
myForm.output.value=strings.join("\n");
myForm.outputSubstring.value=
myForm.inputVal.value.substring(0,10);
}
</script>
</head>
<body>
<form name = "myForm" action = "">
<P>Enter a sentence to split into words<br/>
<input name="inputVal"type="text"size="40"/>
<input name="splitButton"type="button" value=
"Split"onclick="sBP()"/></p>
<p>The sentence split into words is <br/>
<textarea name = "output"rows="8"cols="34">
</textarea></p>
<p>The first 10 characters of the input string are
<input name ="outputSubstring"type="text" size="15"/>
</p>
</form>
</body>
</html>