我的vb代码: private sub kxedu_documentcomplete(byval pdisp as object, url as variant) web.document.forms(0).userlogin.username.value = "msn2005 " web.document.forms(0).userlogin.password.value = "724864 " web.document.forms(0).userlogin.checkcode.value=??? web.document.forms(0).login.click end sub 我这种方法简直没用,后来参考其它资料,改为如下: dim vdoc, vtag dim i as integer dim h as integer set vdoc = kxedu.document for i = 0 to vdoc.all.length - 1 set vtag = vdoc.all(i) select case vtag.tagname case "input " select case vtag.name case "username " vtag.value = "msn2005 " case "password " vtag.value = "123456 " end select end select next i 仍然无法填写用户名和密码,更别说验证码和登录了。不知如何办才行?
发表于:2007-05-17 08:12:181楼 得分:0
这样应该是可以的吧
发表于:2007-05-17 14:21:042楼 得分:0
不行啊,如果行的话我不会拿出来提问了啊。
发表于:2007-05-21 05:51:023楼 得分:0
怎么没人回呢?自己顶上。
发表于:2007-05-28 06:42:034楼 得分:0
再顶一次了。
发表于:2007-05-28 09:40:555楼 得分:0
document.form(i).sumbit
发表于:2007-05-29 11:11:526楼 得分:0
楼上的,什么意思啊?能否说详细点呢?
发表于:2007-05-29 16:10:197楼 得分:0
楼上的说你没提交
name是分大小写的,你再试试
发表于:2007-05-30 13:40:228楼 得分:0
哦,我也明白他的意思,但那不是关键;name大小写我都试过了,也无效。
发表于:2007-05-30 22:05:309楼 得分:0
顶到问题解决为止!
发表于:2007-05-31 20:27:0110楼 得分:0
鍙堟矇涓嬪幓浜
发表于:2007-06-01 11:50:3911楼 得分:2
真是个直心眼的兄弟呀…… 你再前面加个lcase()或者ucase()不行吗…… 另外密码的name是userpassword好不好…… for i = 0 to vdoc.all.length - 1 set vtag = vdoc.all(i) select case lcase(vtag.tagname) case "input " select case lcase(vtag.name) case "username " vtag.value = "msn2005 " case "userpassword " vtag.value = "123456 " end select end select next i
发表于:2007-06-01 15:56:1612楼 得分:8
dim vdoc, vtag dim i as integer dim h as integer set vdoc = kxedu.document for i = 0 to vdoc.all.length - 1
if ucase(vdoc.all(i).tagname) = "input " then set vtag = vdoc.all(i) select case vtag.name case "username " vtag.value = "msn2005 " case "userpassword " vtag.value = "123456 " end select next i
发表于:2007-06-01 15:57:3813楼 得分:0
上面最后忘了end if
dim vdoc, vtag dim i as integer dim h as integer set vdoc = kxedu.document for i = 0 to vdoc.all.length - 1
if ucase(vdoc.all(i).tagname) = "input " then set vtag = vdoc.all(i) select case vtag.name case "username " vtag.value = "msn2005 " case "userpassword " vtag.value = "123456 " end select next i end if
发表于:2007-06-03 20:44:4814楼 得分:0
首先感谢nationalsix(相思子)和coffee54676()(虽然end if 放在了next i后边)两位的回帖,但两位的代码运行后均提示为: object doesn 't support this property or method (error 438)