其实主要是看html文件编写就可以了,你需要写一个activex,在网页种调用这个activex,而你的activex的作用,就是启动你的程序。下面是网络蚂蚁网页的解释
Sub AddLink(Url,Info)
On Error Resume Next
set NetAntsApi=CreateObject("NetAnts.API")<font color="red">//NetAnts.API就是这次调用的activex,也就是你看到的antapi.dll</font>
if err<>0 then
MsgBox("NetAnts not properly installed on this PC!")
else
if NetAntsApi.IsUrlExist(Url) then
MsgBox(Url+vbCrLf+"already in queue")
else
call NetAntsApi.AddUrl(Url, Info, external.menuArguments.document.Url)<font color="red">//在这里,呼叫了activex的方法addurl添加内容</font>
end if
end if
end sub
Sub OnContextMenu()
set srcEvent = external.menuArguments.event
set EventElement = external.menuArguments.document.elementFromPoint ( srcEvent.clientX, srcEvent.clientY )
if srcEvent.type = "MenuExtAnchor" then
set srcAnchor = EventElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
Loop
Call AddLink(srcAnchor.href,srcAnchor.innerText)
elseif srcEvent.type="MenuExtImage" then
if TypeName(EventElement)="HTMLAreaElement" then
Call AddLink(EventElement.href,EventElement.Alt)
else
set srcImage = EventElement
set srcAnchor = srcImage.parentElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
if TypeName(srcAnchor)="Nothing" then
call AddLink(srcImage.href,srcImage.Alt)
exit sub
end if
Loop
Call AddLink(srcAnchor.href,srcImage.Alt)
end if
elseif srcEvent.type="MenuExtUnknown" then
set srcAnchor = EventElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
if TypeName(srcAnchor)="Nothing" then
Call AddLink(EventElement.href,EventElement.innerText)
exit sub
end if
Loop
Call AddLink(srcAnchor.href,srcAnchor.innerText)
elseif 1=1 then
MsgBox("Unknown Event Source """ + srcEvent.type + """" + vbCrLf + "Please send description of error to hong_lewis@bigfoot.com")
end if
end sub
call OnContextMenu()
</script>
用javascript也能写这个网页的,而且会简单许多