IE does not explain the causes and solutions of VBScript

Source: Internet
Author: User
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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.