关于activex 与javascript 交互求助 - VB / 控件
网上找到以下资料
activex来操作javascript函数。
我们在网页中加入一段javascript代码:
function Test(){
alert("test")
}
在activex我们可以通过如下代码来调用。
UserControl.Parent.Script.Test()
同时我们可以使用
UserControl.Parent.Script.window.Close来关闭当前网页。
UserControl.Parent.Script.document.location.href="aa.html" 来更换连接。
我的VB控件中
Private Sub Command1_Click()
UserControl.Parent.Script.Test()
End Sub
提示UserControl.Parent.Script.Test()这句语法错误,请问UserControl是自己的控件名称吗?我的控件名称是MyControl,我改为MyControl.Parent.Script.Test()也不行
相关问答:
我想把word另存为xml之后,用vb读取这个xml的内容,请问如何实现?
dim f as integer
dim b() as byte
dim s as string
dim L as long
f=freefile()
open "abc.xml" for binary access read as #f
......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' 打开刚创建的文件。
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' 读入所有字符到变量中 ......
现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
挺繁琐,之前发的帖子,分值太低现在重发一个。欢迎各位大侠~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
代码如下:
<table>
<tr>
<td>第一行
</td>
</tr>
<tr>
<td><a href="javascript:delete()">删除</a>
</td>
< ......