Board logo

标题: [问题求助] vbs自动填表单的Document用法 [打印本页]

作者: lcg823    时间: 2012-4-21 11:06     标题: vbs自动填表单的Document用法

用网上找的这个代码,但对这个页面操作怎么就不行了呀?老提示:缺少对象: 'Document.GetElementById(...)'
网上没能找到有关Document的详细用法?
望各位好汉指点指点!!先谢谢啦!
  1. Option Explicit
  2. Dim MKuser,MKpass,ie
  3. MKuser="123456789"
  4. MKpass="123456"
  5. Set ie=CreateObject("InternetExplorer.Application")
  6. ie.Navigate "http://211.142.211.10/?wlanacname=0007.0736.731.00&wlanuserip=10.200.130.77&ssid=CMCC-EDU"
  7. ie.Visible=1
  8. While ie.Busy OR ie.ReadyState <> 4
  9. Wend
  10. ie.Document.GetElementById("UserName").Value = MKuser
  11. ie.Document.GetElementById("PassWord").Value = MKpass
  12. ie.Document.All.LoginForm.Submit
  13. Set ie = Nothing
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2