首先winform中设置
<System.Runtime.InteropServices.ComVisibleAttribute(True)> _
Public Class Form1
formload中设置
webbrowser.ObjectForScripting = Me
Public Sub add(ByVal numAs String)
网页中
window.external.add(num)
原文链接:https://www.f2er.com/vb/258830.html