如何在vb.net中使用javascript以编程方式单击链接

How to programmatically click a link which use javascript in vb.net

本文关键字:javascript 编程 方式 链接 单击 vb net      更新时间:2023-09-26

大家好,我只是厌倦了在互联网上搜索这个问题的解决方案,我已经使用了所有的可能性,它没有工作下面是链接

的HTML代码
 <li id="jplain" class=""><a href="javascript:void(0);" onclick="return usePlainText('draft');">HTML</a></li>

任何帮助都会很感激,谢谢你。

我不知道这是否太晚了,但我碰巧看到它没有解决方案。在下面的javascript代码中,我有一个点击甚至与表单上的按钮(hdnF5)相关联。这是按钮的点击事件。它会做一些事情,然后触发另一个点击事件在另一个控件上…也许是一个链接或另一个按钮。

function FireClickEventFromSomeClickableControl() {
/* other instructions in here
   then finally getting to the
   last instruction below to 
   cause a click event on the
   control(the one you want the
   click event on) to fire.
*/
  document.form1.hdnF5.click();
}