当前位置:编程学习 > VB >>

怎么用VB提取下面网页里的文本

http://item.taobao.com/item.htm?id=7981509160

里提取下面的文本:

补充:试验成功,马上给分!

答案:

VB6的,引用了Microsoft VBScript Regular Expressions 5.5,执行前在工程,引用里选上。

Form1.frm:

 

VERSION 5.00

Object ="{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0";"MSINET.OCX"

Begin VB.Form Form1

  Caption         =   "Form1"

  ClientHeight    =   4980

  ClientLeft      =   60

  ClientTop       =   345

  ClientWidth     =   8910

  LinkTopic       =   "Form1"

  ScaleHeight     =   4980

  ScaleWidth      =   8910

  StartUpPosition =   3  '窗口缺省

  Begin VB.CommandButton Command1

     Caption         =   "Command1"

     Height          =   495

     Left            =   3780

     TabIndex        =   10

     Top             =   4080

     Width           =   1215

  End

  Begin VB.TextBox Text1

     Height          =   375

     Index           =   4

     Left            =   2940

     TabIndex        =   9

     Top             =  3120

     Width           =   1215

  End

  Begin VB.TextBox Text1

     Height          =   375

     Index           =   3

     Left            =   2940

     TabIndex        =   8

     Top             =   2480

     Width           =   1215

  End

  Begin VB.TextBox Text1

     Height          =   375

     Index           =   2

     Left            =   2940

     TabIndex        =   7

     Top             =   1840

     Width           =   1215

  End

   BeginVB.TextBox Text1

     Height          =   375

     Index           =   1

     Left            =   2940

     TabIndex        =   6

     Top             =   1200

     Width           =   1215

  End

  Begin VB.TextBox Text1

     Height          =   375

     Index           =   0

     Left            =   2520

     TabIndex        =   5

Text = " http://item.taobao.com/item.htm?id=7981509160"

     Top             =   360

     Width           =   5595

  End

  Begin InetCtlsObjects.Inet Inet1

     Left            =   6840

     Top             =   1560

     _ExtentX        =   1005

     _ExtentY        =   1005

     _Version        =   393216

  End

  Begin VB.Label Label1

     Caption         =   "收藏次数"

     Height          =   435

     Index           =   4

     Left            =   1020

     TabIndex        =   4

     Top             =   3180

     Width           =   1215

  End

  Begin VB.Label Label1

     Caption         =   "查看次数"

     Height          =   435

     Index           =   3

     Left            =   1020

     TabIndex        =   3

     Top             =   2520

  &nb

上一个:VB是怎么编出病毒、木马的
下一个:写WG需要什么API和知识--VB

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,