精易论坛

标题: VB 翻译到 易语言 或帮忙看下 [打印本页]

作者: 愿尘世美    时间: 2013-7-21 01:42
标题: VB 翻译到 易语言 或帮忙看下
VB
Private Sub Command1_Click()
List1.Clear
Dim gettable
Set gettable = WebBrowser1.Document.getelementsbytagname("table")
For i = 0 To gettable.length - 1
idname = gettable.Item(i).id
If idname <> "" Then
  Set gettable2 = gettable.Item(i).getelementsbytagname("td")
  List1.AddItem idname & " " & gettable2(0).innerHTML & gettable3(0).href
End If
Next
End Sub


我翻译了一部分
.版本 2

.子程序 _按钮1_被单击
.局部变量 对象, 对象
.局部变量 对象1, 对象
.局部变量 x, 整数型
.局部变量 sd1, 对象
.局部变量 sd2, 文本型

sd.初始化 (, 1573976)
对象 = sd.取元素集合 (“table”)
.计次循环首 (对象.读数值属性 (“length”, ), x)
    sd2 = 到文本 (对象.对象型方法 (“item”, x - 1).读文本属性 (“id”, ))
    .如果真 (sd2 ≠ “”)
        列表框1.加入项目 (sd2, )
    .如果真结束

.计次循环尾 ()


gettable.Item(i).getelementsbytagname("td")  这句话不知道在易语言里怎么写  谢谢各位大牛们、

作者: 被封禁言    时间: 2013-7-21 01:42
vb到易语言源码
http://125.confly.eu.org/thread-13614280-1-1.html
(出处: 精易论坛)

作者: 愿尘世美    时间: 2013-7-21 01:43
.对象型方法 (“getElementsByTagName”, “td”) 读不出来




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4