vb实现网页自动填表
http://tieba.baidu.com/f?kz=580219489
http://www.anqn.com/vb/154/8974.shtml
http://www.codefans.net/soft/5089.shtml
http://www.mndsoft.com/blog/article.asp?id=1121
http://topic.csdn.net/t/20020113/14/474848.html
直接运行网页中的JavaScript:
function alllefttab()
WebBrowser1.Document.parentwindow.execScript "insert(2)", "JavaScript"
自动选择下拉列表中的某项2
Dim s
s = "javascript:document.getElementsByName(""w_type"")[0].value='2';void(0)"
WebBrowser1.Document.parentwindow.execscript s
添加一个WebBrowser1
Private Sub Form_Load()
WebBrowser1.Navigate "http://zhidao.stnts.com/"
'WebBrowser1.Navigate "http://zhidao.stnts.com/index.php?act=worklog:loginfo&id="
End Sub
Private Sub Form_Resize()
WebBrowser1.Width = Me.Width - 600
WebBrowser1.Height = Me.Height - 1000
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'登录并转到
If WebBrowser1.LocationURL = "http://zhidao.stnts.com/" Then
Dim vDoc, vTag
Dim i As Integer
Set vDoc = WebBrowser1.Document
For i = 0 To vDoc.All.length - 1
If UCase(vDoc.All(i).tagName) = "INPUT" Then
Set vTag = vDoc.All(i)
If vTag.Type = "text" Or vTag.Type = "password" Then
Select Case vTag.Name
Case "userid"
vTag.Value = "这里是用户"
Case "userps"
vTag.Value = "这里是密码"
End Select
ElseIf vTag.Type = "submit" Then
vTag.Click
End If
End If
Next i
WebBrowser1.Navigate "http://zhidao.stnts.com/index.php?act=worklog:insert"
End If
If WebBrowser1.LocationURL = "http://zhidao.stnts.com/index.php?act=worklo
相关文档:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
......
摘要: 本文阐述了在VB程序中利用ADO对象动态创建数据库和数据表的方法,这些方法在开发VB数据库应用程序中很有实用价值,它可以提高数据库程序灵活性。
关键词:数据库、数据表、ADO、ADOX
1: 问题的提出
在Visual Basic中,常用的数据访问接口有下列三种:数据库访问对象(DAO,Data A ......
工作需要,针对java文件,作了一个行数统计的工具。统计的主要代码如下:
Set srcIn = fso.OpenTextFile(fileNm, ForReading)
Do While Not srcIn.AtEndOfStream
buf = srcIn.ReadLine
&nbs ......
VB编写托盘图标有两个要点,一是使用 Shell_NotifyIcon 函数显示图标;二是向系统注册 TaskbarCreated 消息,以便explorer崩溃时恢复托盘的图标。
首先需要增加一个模块文件,内容如下:
Public Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOT ......
VB隐藏进程问题的讨论由来已久,效果有好有坏,反正是各有各的招,偶然机会看到planet-source一段隐藏进程的文章,作者说采用了kernel mode driver!方法,
单从技术方法而言,这是目前见到隐藏进程中最强悍的了(个人见解,井底之蛙了),不过这种东西用在正义的人手上是一个除暴安良的利器,用心叵测者就不好说了,但是技术终归是技术 ......