试试这个 <input type=button value="openfile" onclick="vbscript:openfile('C:\xx.txt')"> <script language=vbscript> Function openfile(strFl) Dim fso Dim fl Dim pth Dim flnameDim shl Dim shfd
Set fso = CreateObject("scripting.filesystemobject") Set fl = fso.GetFile(strFl) pth = fl.ParentFolder.Path flname = fl.Name Set shl = CreateObject("Shell.application") Set shfd = shl.Namespace(pth)shfd.Items.Item(flname).InvokeVerb "open" End Function </script>
路径就写file://xxxx就好了吧
如:<a type="video/mpeg" href="111.mpag">
你试试看
<a href="file://xxxx.vbp" type="*/*">xxxx.vbp</a>
我不知道*.vbp的文件类型是什么,希望知道的告诉我一下。
<input type=button value="openfile" onclick="vbscript:openfile('C:\xx.txt')">
<script language=vbscript>
Function openfile(strFl)
Dim fso
Dim fl
Dim pth
Dim flnameDim shl
Dim shfd
Set fso = CreateObject("scripting.filesystemobject")
Set fl = fso.GetFile(strFl)
pth = fl.ParentFolder.Path
flname = fl.Name
Set shl = CreateObject("Shell.application")
Set shfd = shl.Namespace(pth)shfd.Items.Item(flname).InvokeVerb "open"
End Function
</script>
hhjjhjhj(大头)(想变胡萝卜^^) 的方案倒是可以,不过总有对话框弹出,不爽,难到真的没有更好的方案了吗?
<!--
window.showHelp("aa.chm");
//-->
</SCRIPT>