ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¶}±Òhtmlºô­¶©Maspºô­¶ªº¶}±Ò¤è¦¡¬O§_¬Û¦P?

[µo°Ý] ¶}±Òhtmlºô­¶©Maspºô­¶ªº¶}±Ò¤è¦¡¬O§_¬Û¦P?

ie = CreateObject("InternetExplorer.Application")
                ie.Visible = True
                ie.Navigate "https://abc.asp"
¶}±Òhtmlªº®É­Ô¨S°ÝÃD¡A¶}©laspªº®É­Ô¡Aºô­¶¥X¤£¨Ó¡A¥Ø«e¥¿¦b¤Wºô«ùÄò´M§ä¤¤¡C

¦^´_ 1# av8d
https://abc.asp §ä¤£¨ì³oºô­¶
  1. Sub Ex()
  2. Dim Ie As Object
  3. Set Ie = CreateObject("InternetExplorer.Application")
  4. Ie.Visible = True
  5. Ie.Navigate "http://www.tvbs.com.tw/news/news_list.asp"
  6. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2011-7-19 10:26 ½s¿è

¦^´_ 2# GBKEE

htmlºô­¶¦Û°Ê¿é¤J¤F±b¸¹±K½X
ie.document.all("username").innerText = "abc123"
ie.document.all("password").innerText = "123123"
ie.Document.all("submit").Click
htmlºô­¶¤º¦³asp¶W³sµ²ÂI¤J«á¡A·|ÅçÃÒ±b¸¹±K½X(±b¸¹±K½X©M¤W­z¬Û¦P)¡A
¦ý¬O¦n¹³¼gªk©M¤W­z¤£¦P¡A§ì¨úTextªº­È¤À§O¬O±b¸¹SID¡B±K½XAPID¡B«ö¤U½T»{¶s¤£½T©w¡A¦n¹³¬Ologin¡C
¥Ñ©óºô­¶¬°¤½¥q¤º³¡ºô¯¸¡A¥~³¡µLªk³sµ²¡A§Ú¦^¨ì®a·Q´ú¸Õ³£¨S¿ìªk¡C

TOP

­n¬Ýºô­¶­ì©l½X°]¤§¹D
¦]¬°¥Lªºname ¤£¤@©w¬O username
¥Bclick ªºª«¥ó¥i¯à¤]¦³¦WºÙ
GinBow

TOP

¦^´_ 4# ginbow


     ¬Oªº¡A¥i¬Oaspªº¦n¹³´M§ä¤èªk´N¤£¦P¤F¡A³s«öF12³£µLªk§¹¥þ½T©w³o­ÓTextbox©M«ö¶s¬O³o­Ó¡A¥L³sÅã¥Ü³£¨S¦³Åã¥Ü¡C

TOP

¦]¬°§Ú¤£ª¾¹Dºô­¶«¬ºA ¤£¹L§Ú¥H«e¥Îªº¤è¦¡
¬O¥ý¥h¬Ý¥L­ì©l½Xºô­¶µn¤Jªºform
³o¬O§Ú¤§«eªº½d¨Ò

With myIE.document

.getElementsByName("myear")(0).Value = "99"
.getElementsByName("mmon")(0).Value = "08"
.forms("date_form").submit
End With

§Ú¬Oª½±µ¥h­ì©l½X¬Ý¥L¨º2®æª«¥óªº¦W¦rµM«áª½±µµ¹»y­È
¦Ó¦b¸ê®Æ³Ì«á °e¥X¥hªº¨º¤@­Óª«¨£¦WºÙ ¬Odate_form

§A¤W­±¥´±o ie.Document.all("submit").Click
¦]¸Ó¤£·|¦³¦WºÙ¥ssubmitªº§a...¤£¹L§Ú¤]¤£¤Ó½T©w
»¡¤£©w¯uªº¦³¤H¥Î = = submit ¦bjavascrip ¬O«üªí³æ°e¥Xªº·N«ä
GinBow

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2011-7-20 11:26 ½s¿è

¦]¬°¬O¤º³¡ºô¯¸©Ò¥H¤£ª¾¹D±zµn¤£µn±o¶i¥h
            With CreateObject("InternetExplorer.Application")
                .Navigate "http://vitals.tycg.gov.tw/SC21/TOP1.asp"
                .getElementsByName("strSID")(0).Value = "aaa"               
                . getElementsByName("strAPID")(0).Value = "bbb"
                .forms("date_form").submit
                '.Document.all("submit2").Click
                .Visible = True
            End With
·|¥X²{"ª«¥ó¤£¤ä´©¦¹ÄݩʩΤèªk"
-----------------------------------------------
§Ú¬d¤F¤@¤Uºô¯¸¡A¥L­Ì³£¦³¥[¤J³o¤T¦æ               
Do While .Busy Or .ReadyState <> 4
DoEvents
Loop

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2011-7-21 08:19 ½s¿è

§Úµo²{¦³¨Ç¬Oinput name
¦³¨Ç¬Otextarea name
§Ú¥uª¾¹Die.document.all("username").innerText = "aaa" ¹ïÀ³ªº¬Oinput name
textarea name´N¤£±o¦Óª¾¤F¡A§Ú«ùÄòºô¸ô¤W¬d¸ß¤¤¡C

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD