How to simulate click event on an input box

后端 未结 2 1217
离开以前
离开以前 2021-01-25 02:05

I am trying to simulate click on an input box. When its clicked manually, a drop down auto suggestion box appears as suggestions about past searches. However, when I try to simu

2条回答
  •  一生所求
    2021-01-25 02:40

    If you want to use pure/native javascript, you can use the onfocus attribute of the input element to call a Js function.

    
    
    
         
        
    

    In the above file, you should see the "OK" button appear when you click on the input field.

提交回复
热议问题