0

以下は、私が HTML Kit で作業しているコードであり、私が知っているすべての修正を試みましたが、修正できませんでした。

これは私が得たエラーです:

ERROR: An error has occurred in the script on this page
       Line: 35
       Char: 2
       ERROR: Expected Statement
       Code: 0

私のスクリプト:

1. <script language = vbscript>
2. Option Explicit
3.
4. DIM valueofhome, countyhome, charleston, berkeley, dorchester, rate, taxowed
5.
6. 'input
7. valueofhome= inputbox("What is the value of the home?")
8. countyhome= inputbox("What county is home in?")
9.
10. Select Case countyhome
11.
12.  Case "charleston"
13. 
14.   if valueofhome >= 150000 then
15.       rate= .02
16.         
17.     elseif valueofhome >= 50000 then
18.       rate= .015
19.         
20.     else 
21.     rate= .010
22. End if
23.     
24. case "dorchester"
25. 
26.   if valueofhome >= 150000 then
27.       rate= .0175
28.         
29.     if valueofhome >= 50000 then 
30.       rate= .015
31.         
32.     else
33.      rate= .0125
34.
35.  case "berkeley" <<<<<<<<-----------Here is where it is saying the error is
36. 
37.   if valueofhome >= 150000 then
38.       rate= .0275
39.         
40.     if valueofhome >= 50000 then
41.       rate= .0225
42.         
43.     else 
44.      rate= .02  
45. End if  
46. 
47. case else   
48. msgbox("You didn't type in charleston, berkeley, or dorchester")            
49.
50. End select
51.     
52. taxowed= cint(valueofhome) * rate                           
53.     
54. 'output
55. document.write "<br>value of home" & valueofhome 
56. document.write "<br>county home" & countyhome  
57. document.write "<br>tax owed" & taxowed
58. document.write msgbox("You didn't type in charleston, berkeley, or dorchester")
59.
60. </script>
4

1 に答える 1

2

いくつか不足しています:

  • elseif29号線
  • End ifcase "berkeley"
  • elseif40号線
于 2013-04-01T02:48:56.630 に答える