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

¹J¨ì¤£¬OIEªº­ì¥ó¡A¸Ó¦p¦ó¦Û°Êµn¤J?

¹J¨ì¤£¬OIEªº­ì¥ó¡A¸Ó¦p¦ó¦Û°Êµn¤J?

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-4-26 10:45 ½s¿è

<input name="account" id="account" type="text" size="18"/>
<input name="passwd" id="passwd" onkeypress="dologin(event)" type="password"/>
«e­±¨â­Ó
¤@­Ó¬O±b¸¹Äæ¦ìaccount
´N·|¼g¦¨ .Document.all("").Value = "AAA"
¤@­Ó¬O±K½XÄæ¦ìpasswd
´N·|¼g¦¨ .Document.all("").Value = "AAA"
¦pªG«ö¶s«o¥X²{¥H¤U­ì¥ó¡A¦ü¥G¤£¬OIE¨t¦Cªº
<input onclick="checkInput('submit');" type="button" value="µn¤J"/>
¸Ó¦p¦ó¶ñ¼g¸Ì­±ªº¦WºÙ? .Document.all("").Click

¥¿±`IE¨t¦Cªº·|¬O³o¼Ë
<input name="butLogin" id="butLogin" language="javascript" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " type="submit" value="µn¤J"/>
´N·|¼g¦¨ .Document.all("butLogin").Click

¦^´_ 1# av8d
  1. With .Document
  2.             Set A = .getElementsByTagName("input")
  3.             '<input name="account" id="account" type="text" size="18"/>
  4.             'name="account" <=³q±`³£·|¤@¼Ë=> id="account"
  5.             A("account").Value = "AAA"
  6.             '<input name="passwd" id="passwd" onkeypress="dologin(event)" type="password"/>
  7.             'name="passwd" <=³q±`³£·|¤@¼Ë=> id="passwd"
  8.             A("passwd").Value = "AAA"
  9.             '<input onclick="checkInput('submit');" type="button" value="µn¤J"/>
  10.             '¨S¦³ name ,¤]¨S¦³id ¦ý¦³type="button",value="µn¤J"
  11.             Debug.Print A.Length - 1
  12.             For i = 0 To A.Length - 1
  13.                Debug.Print A(i).Type, A(i).Value
  14.                 If A(i).Type = "button" And A(i).Value = "µn¤J" Then
  15.                     A(i).Click
  16.                     Exit For
  17.                 End If
  18.             Next            
  19.         End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


input name ¨Ï¥Î
With CreateObject("InternetExplorer.Application")
        .Navigate ""
        .Visible = True

        Do While .Busy Or .ReadyState <> 4
            DoEvents
        Loop
  .Document.all ("").Value = ""

select name«h¨Ï¥Î?
input type«h¨Ï¥Î?

TOP

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE

ºô§}¡Ghttp://www.otc.org.tw/web/stock/ ... o_analysis/pera.php   

    .Document.all("rdo_search_site").Click
    .Document.all("input_search_stk").Value = "1"

¥H¤W¨â­Ó¤À¶}°µ -> ¦³®ÄªG
©M¦b¤@°_°µ«h²Ä¤@­ÓµL®ÄªG
¨D¸Ñ¡AÁÂÁ¡I

³Æµù¡G
.Document.all("rdo_search_site").Click
¥H¤W³o¬q¬O¥k¤W¤è¿ï¨ú¥þ¯¸·j´Mªº«ö¶s«ö¤U

.Document.all("input_search_stk").Value = "1"
¥H¤W³o¬q¬O¥k¤W¤è¦b­ÓªÑ¬d¸ß¥k¤è¿é¤J1

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-9 06:28 ½s¿è

¦^´_ 5# av8d
  1. Option Explicit
  2. Sub Ex_ºô­¶¤¸¯À()
  3.     Dim i As Integer, E As Object
  4.     With CreateObject("InternetExplorer.Application")
  5.         .Visible = True
  6.         .Navigate "HTTp://www.otc.org.tw/web/stock/aftertrading/peratio_analysis/pera.php"
  7.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  8.          
  9.         With .Document
  10.           '*** ³o¬qµ{¦¡½X¥i¬d¬Ý³oºô­¶ªº¤¸¯À¤º®e
  11.           '  On Error Resume Next
  12.           '  For Each E In .all
  13.           '      i = i + 1
  14.           '      Cells(i, "a") = E.tagname
  15.           '      Cells(i, "b") = E.ID
  16.           '      Cells(i, "c") = E.Name
  17.           '      Cells(i, "d") = E.Value
  18.           '      Cells(i, "e") = E.innertext
  19.           '      Cells(i, "f") = E.Type
  20.           '      Cells(i, "g") = E.href
  21.           '  Next
  22.           '****************************************
  23.             '*** ¥þ¯¸·j´M
  24.             .all("rdo_search_site").Click    '¥þ¯¸·j´M¿ï¶µ.Click,«á¬Û¹ïÀ³ªºtext®Ø·|Åã¥Ü
  25.             .all("input_search_site").Value = "3126"
  26.             Stop
  27.             '*** ­ÓªÑ¬d¸ß
  28.             .all("rdo_search_stk").Click
  29.             .all("input_search_stk").Value = "1256"
  30.             
  31.             '«ö¤U ·j´MÁä
  32.             .all("header_search_btn").Click
  33.         End With
  34.     '    .Quit        'Ãö³¬ºô­¶
  35.     End With
  36. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD