<html>
   <head>
      <title>String</title>
      <script type = "text/javascript">
         <!--
         function splitButtonPressed()
         {
            var inputString = document.getElementById( "inputVal" ).value;
         
         
          var inputString2 = document.getElementById( "inputVal2" ).value=inputString*0.09+200;       
         
         
            document.getElementById( "output" ).value =                                                                 
                          } // end function splitButtonPressed
         // -->
      </script>
   </head>
   <body>
      <form action = "">
         <p>Enter sales amount<br />
         <input id = "inputVal" type = "text" size = "40" />
         <input type = "button" value = "Submit"
            onclick = "splitButtonPressed()" /></p>
                   
                   
          <input id = "inputVal2" type = "text" size = "40" />
         
                   
                   
                   
                   
         <p><textarea id = "output" rows = "20" cols = "60">
         </textarea></p>              </form>
   </body>
</html>
只差textarea,
textarea要求輸出以下:
$200-399           0
$400-599           0   
$600-799           0
$800-999           0
$1000 and over     0
如果"inputVal2"輸出($610)是$600-799的範圍,0變1,一定用array完成
請求高手解決~