最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vbs自動填表單分析附源碼

 更新時間:2008年06月19日 09:19:34   作者:  
用vbs實現(xiàn)的自動填寫表單的代碼分析,希望大家注意代碼的寫法
dim ie 
set ie=createobject("internetexplorer.application") 
ie.visible=true 
ie.navigate "http://www.ln.chinaunicom.com/index.shtml" 
While ie.busy or ie.readystate<>4 
EndWhile 
ie.document.all("userid").value= "13304948957"'手機號碼 
ie.document.all("passwd").value = "111111"'密碼 
ie.document.all("verifycode").value = "1111"'識別碼 
ie.document.all.loginOnForm.submit 

一調試腳本就顯示 缺少對象:"ie.document.all("....")" 
"ie.document.all.loginOnForm.submit"這行還顯示對象不支持此屬性或者方法 
請各位大俠幫忙看看 哪里出了錯 謝謝啦
提問者: fxdca2008 - 試用期 一級 
最佳答案
樓主代碼有幾處錯誤: 
1. EndWhile應為Wend 
2. 網(wǎng)頁上的手機號碼、密碼等表單元域其實是在一個<iFrame>中的網(wǎng)頁上,不能直接調用,而應該使
用ie.document.frames(0).document.loginOnForm...來調用 
正確代碼如下(可以自動填寫交提交,提交上去以后會返回“識別碼錯誤”的提示,屬于正常現(xiàn)象)
: 
Sub test() 
Dim ie 
Set ie = CreateObject("internetexplorer.application") 
ie.Visible = True 
ie.navigate "http://www.ln.chinaunicom.com/index.shtml" 
While ie.busy Or ie.readystate <> 4 

Wend 
ie.document.frames(0).document.loginonform.UserId.Value = "13304948957" '手機號碼 
ie.document.frames(0).document.loginonform.passwd.Value = "111111" '密碼 
ie.document.frames(0).document.loginonform.verifycode.Value = "1111" '識別碼 
ie.document.frames(0).document.loginonform.submit 
End Sub

相關文章

最新評論

正定县| 承德县| 杭锦后旗| 怀宁县| 成安县| 申扎县| 白朗县| 永平县| 龙泉市| 玛曲县| 金山区| 焦作市| 武定县| 青海省| 黄山市| 青神县| 阆中市| 南和县| 涿鹿县| 专栏| 怀来县| 高陵县| 安徽省| 邻水| 孝感市| 喜德县| 招远市| 米林县| 南木林县| 朝阳县| 庄浪县| 名山县| 织金县| 大渡口区| 姚安县| 开江县| 无棣县| 邢台市| 万山特区| 盈江县| 新竹市|