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"
  • elseif在 40 号线
于 2013-04-01T02:48:56.630 回答