Vbscript| Solution
Previously written. ASP Web page program, has been running well, but recently in someone else's machine can run, but in my machine is not, there is a Web page error: The object does not support this property or method. In fact, IE did not solve VBScript or explain the error. Originally always thought that my machine ie was destroyed, or other causes, has been puzzled, because this program is a few years ago I personally compiled, has been no problem! So to my machine is to delete ie again, but also to check the poison, stop the firewall, but also registered regsvr32 Vbscript.dll, but all the treatment is useless. Finally tracked, the discovery is due to the use of VBScript's function default (). adding parentheses () and calls () to the function is normal.
The original is this:
SubNextmonth
M1=mid (form1.cxny.value,5,2)
Y1=mid (form1.cxny.value,1,4)
If m1<> "" Then
M1=m1+1
Else
MsgBox "There may be an error in the month of the query!" ", 0,form1.cxny.value
Exit Sub
End If
If M1>12 Then
Y1=y1+1
M1=1
End If
If M1>9 Then
Form1.cxny.value=y1&m1
Else
form1.cxny.value=y1& "0" &m1
End If
Document.form1.submit
End Sub
Called in the Web page
<input type= "button" value= "next month" name= "Month2" >
After modification:
Sub nextmonth ()
End Sub
Called in the Web page
<input type= "button" value= "next month" name= "Month2" >
Add all the similar functions by default to parentheses (), and everything works. So far, I've figured out that it was good, and now you can't use the default bracket.