加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

VB ActiveX与JS交互

发布时间:2020-12-16 23:26:07 所属栏目:大数据 来源:网络整理
导读:一、js访问activex VB: -------------------------------- Public Property Let TxtVisible(ByVal New_TxtVisible As Boolean) Text1.Visible = New_TxtVisible PropertyChanged 'BlnSystemUser' End Property Public Sub SetValue1() Text1.Text = "test zh

一、js访问activex

VB:
--------------------------------
Public Property Let TxtVisible(ByVal New_TxtVisible As Boolean)
Text1.Visible = New_TxtVisible
PropertyChanged 'BlnSystemUser'
End Property

Public Sub SetValue1()
Text1.Text = "test zhanpeng"
End Sub
Public Sub SetValue2(str)
Text1.Text = str
End Sub
----------------------------------

JS:
---------------------------------
document.getElementById("obj").TxtVisible = false;
document.getElementById("obj").SetValue1();
document.getElementById("obj").SetValue2(44);
---------------------------------

二、activex访问js.txt

VB:
------------------------
Private Sub Command2_Click()
UserControl.Parent.Script.test (3)
End Sub
--------------------------

js:------------------------function test(str){alert(str);}------------------------

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读