我的网页上有一个文本框,我在其上输入了一个数字。之后我想执行“Enter”键按下事件。怎么做?
我试过了:
代码:
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_ENTER = &HD
Declare Function GetKeyState Lib "user32.dll" (ByVal nVirtKey As Long) As Integer
Function ENT()
keybd_event VK_ENTER, 1, 0, 0
End Function
我用来在该文本框中输入数字的VBA代码:
.document.getElementById("filteredListForm:wfmtAllTaskList:wfmtAllTaskList_columns_2:2:_filterInput").Value = number
**在这段代码之后我要执行什么在这个文本弓中输入键事件。
该文本框的HTML代码:
<input id="filteredListForm:wfmtAllTaskList:wfmtAllTaskList_columns_2:2:_filterInput"
class="mdw_columnFilter" type="text" placeholder="Project ID"
onblur="hideFilterInput(this);" onkeydown="submitOnEnter(event, this.form);"
value="" name="filteredListForm:wfmtAllTaskList:wfmtAllTaskList_columns_2:2:_filterInput">
答案 0 :(得分:0)
不是,使用HTML对象库回答备注,
nativeCheckbox.PointerEntered += (s, args) => { };