简体   繁体   English

如何在dotnetbrowser中获得textarea的焦点?

[英]How to get focus of textarea in dotnetbrowser?

I am looking through the samples and I have got solution for focusing on dom element using tab.I am trying to focus on textarea which is on site, so i had used virtual Tab key press to find that particular textarea and its working correctly. 我正在查看示例,并且已经找到了使用tab专注于dom元素的解决方案。我试图专注于站点上的textarea,因此我使用了虚拟Tab键来查找特定的textarea及其正常工作。 But can anyone suggest how to directly focus on textarea. 但是任何人都可以建议如何直接关注文本区域。 I also used excuteJavascript function but its not working. 我也使用了excuteJavascript函数,但是它不起作用。

DotNetBrowser DOM API provides two methods: DOMElement.Focus() and DOMElement.Blur() . DotNetBrowser DOM API提供了两种方法: DOMElement.Focus()DOMElement.Blur() This functionality allows you to request focus on particular HTML DOM element. 此功能使您可以请求将重点放在特定的HTML DOM元素上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM