VBA / HTML / jQuery Chosen AutoComplete - Select in a list

后端 未结 1 1163
暗喜
暗喜 2021-01-27 11:41

I\'m trying to select a value in a list on a website using VBA in Excel. It\'s not a \"normal list\", the website is using jQuery Chosen auto-complete (like this : example ). It

1条回答
  •  攒了一身酷
    2021-01-27 12:16

    Well, I finally found an answer. Maybe it will help others :

    Dim CurrentWindow As HTMLWindowProxy: Set CurrentWindow = IE.document.parentWindow
    Call CurrentWindow.execScript("jQuery('#type').val('2');jQuery('#type').trigger('chosen:updated');")
    

    0 讨论(0)
提交回复
热议问题