VB.NET中的Javascript功能 [英] Javascript funtion in VB.NET

查看:126
本文介绍了VB.NET中的Javascript功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<a class="toolbarButton" href="javascript:top.detail.tpzExecute('6',null,'detail');void(0);" origcaption="Search" title="Start this Search  Alt+F6" tabindex="1"><img src="images/obj16/tsearch.gif" alt="Start this Search  Alt+F6" title="Start this Search  Alt+F6">&nbsp;Search</a>







Does anyone know how to execute the next javascript funtion in VB.NET

Thanks



推荐答案

尝试

VB.NET / C#和JavaScript通信 [ ^ ]

如何从代码隐藏中调用Javascript代码 [ ^ ]

如何从页面后面的VB代码调用javascript函数 [ ^ ]
Try
VB.NET/C# and JavaScript communication[^]
How to call Javascript code from code-behind[^]
How call javascript function from VB code behind page[^]


谢谢Abhinav我想出了如何执行工具栏按钮。< br $> b $ b

http://thebot.net/threads/vb-net-help-clicking-javascript-button.119250/



代码将是这样的

Thanks Abhinav I figured out how to execute the toolbar button.

http://thebot.net/threads/vb-net-help-clicking-javascript-button.119250/

the code will be like this
Dim HTMLEles As HtmlElementCollection = WebBrowser1.Document.All
           For Each btn As HtmlElement In HTMLEles
               If btn.GetAttribute("src").Contains("images/obj16/tsearch.gif") Then
                   btn.InvokeMember("click")
               End If


这篇关于VB.NET中的Javascript功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆