请问这个网页按钮用VB怎样点击,谢谢各位,,
<input type="image" src="http://www.xxx.com/sdfd.gif" onClick="check_txt(1);return false;" width="97" height="22" border="0"></a>
是个图片按钮,谢谢
[此贴子已经被作者于2007-10-7 23:28:39编辑过]
请问这个网页按钮用VB怎样点击,谢谢各位,,
<input type="image" src="http://www.xxx.com/sdfd.gif" onClick="check_txt(1);return false;" width="97" height="22" border="0"></a>
是个图片按钮,谢谢
[此贴子已经被作者于2007-10-7 23:28:39编辑过]
'两种方案,不知道是不是你需要的?通过按钮打开网址
'要使用api.下面是api声明
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'方法一,比较安全.但有缺点就是如果有ie打开会使用该ie.
Private Sub Command1_Click()
ShellExecute Me.hwnd, "OPEN", Text1.Text, vbNullString, vbNullString, 1
End Sub
'方法二,Text1.text必须是如http://,ftp://开头的.其实你也可以加上判断.
'优点就是他会打开新的ie
Private Sub Command2_Click()
Shell "explorer.exe " & Text1.Text, vbNormalFocus
End Sub