如何使用html从本地驱动器中选择文件,并将文件路径提供给vb脚本代码

时间:2014-06-23 07:08:36

标签: html xml file vbscript

我使用的是html代码:

<html>
 <body>
    <input type="file" id="myFile" name="myFile"/>
    <a href="#" onclick="showFileName()">Upload</a>
    <script language="vbscript">
     function showFileName() {
         fil = document.getElementById("myFile");
         alert(fil.value);
}
    </body>
</html>

我的VB脚本是:

Dim oFS : Set oFS = CreateObject("Scripting.FileSystemObject") Dim sFSpec : sFSpec = oFS.GetAbsolutePathName("D:\Link\xmlsample.xml")

但我们想要从本地驱动器中选择XML和文本文件的VB脚本代码,并自动将整个绝对文件路径提供给vb脚本程序。例如:oFS.GetAbsolutePathName(whole absolute file path which we are going to be selected from local drive)请帮助我。提前谢谢。

0 个答案:

没有答案
相关问题