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

[µo°Ý] ¥i¥H¾Þ§@¦Û°Ê¤W¶Ç¸ê®Æ¶Ü?

[µo°Ý] ¥i¥H¾Þ§@¦Û°Ê¤W¶Ç¸ê®Æ¶Ü?

¥Ñ©ó¤½¥q¤º³¡ºô­¶µLªk´£¨Ñºô§}

¹Á¸Õ¹L¥ÎmyIE.document.all("txtFile").Value¶Ç­È¶i¥h¡A
¥i¬O[readonly]µLªk¶ñ¤J¡A¦³¨ä¥L¤èªk¶Ü?
ª¦¹L«Ü¦hºô¯¸¸ò¤å³¹§ä¤£¨ì¬ÛÃöªº¸Ñµª¡A
ÁÙ¬OVBA¤£¤¹³\¦Û°Ê¤W¶ÇÀÉ®×?
¦p»ÝFunction§Ú¦b¸É¤W¡C

<!-- upload form -->
<div id="upload" style="margin-top:-20;margin-bottom:-20;display:none">
  <form name="frmUpload" method=POST action='lot_query_upload.jsp' enctype="multipart/form-data">
    <table border="1" cellpadding="0" cellspacing="0" class="w3dFormL" width="70%" align="center">
      <tr>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" align="center">
            <tr>
              <td class="tbl" style="padding-left:10px">Choose a text file
                <input class="tbl" type='file' name="txtFile" size="30" > <!--1.0.1 Remove [readonly] option-->
              </td>
              <td style="padding-left:10px">
                <input class="btn" type="button" name="cmdOK" value="OK" onclick="doUpload()">
                <input class="btn" type="button" name="cmdCancel" value="Cancel" onclick="doCancel()">
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
</div>

¥Ñ©ó¤½¥q¤º³¡ºô­¶µLªk´£¨Ñºô§}

¹Á¸Õ¹L¥ÎmyIE.document.all("txtFile").Value¶Ç­È¶i¥h¡A
¥i¬O[readonly] ...
faye59 µoªí©ó 2018-6-9 21:23


¸É¤W§Úªº¼gªºVBA
¨S¤@¶}©l¸É¤W·Q»¡¨S¤°»ò¤º®e
  1. Option Explicit

  2. Dim a As Object
  3. Sub UpData()
  4. Dim tagid As Object

  5. Set a = CreateObject("InternetExplorer.Application")
  6. a.Visible = True
  7. a.Navigate "http://test/Query.jsp"
  8. While a.Busy = True Or a.readyState <> 4
  9. DoEvents
  10. Wend
  11. a.document.all("fldName").Value = "¿ï³æ"
  12. a.document.all("queryCondition").Value = "¦WºÙ"

  13. Set tagid = a.document.getelementsbytagname("INPUT")
  14. tagid(1).Click
  15. While a.Busy = True Or a.readyState <> 4
  16. DoEvents
  17. Wend
  18. a.document.parentWindow.execScript "tabChange(1, 'P_LOT_OPER', 'ORACLE2')", "JavaScript"
  19. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD