hta 显示查看和跟踪下载消息

hta brings up view and track downloads message

我在 hta 文件中有一堆视频链接,我希望这些链接可以全屏打开 VLC 媒体播放器来查看它们。这是我目前所拥有的:

<HTML>
    <HEAD>
    </head>
    <body>
        <a href="file:///C:******\Video1.mp4">Video 1</a>
        <a href="file:///C:******\Video2.mp4">Video 2</a>
        <a href="file:///C:******\Video3.mp4">Video 3</a>
        <a href="file:///C:******\Video4.mp4">Video 4</a>
    </body>
</html>

这工作正常,但我得到一个 "view or track downloads" window 弹出并询问我是否要下载文件或打开它。如果我 select "open" 它会打开 VLC 并播放视频,但我正试图找到一种方法来阻止此弹出窗口的发生。我一直在寻找几天,找不到答案。我在 win8.1 上使用 ie11。任何帮助将不胜感激。

此外,如果我使用 Windows Media Player 而不是 VLC,则消息不会弹出,但如果可以的话,我更喜欢 VLC。

感谢您的宝贵时间。 格雷格

您可以使用 objShell.Run 命令和一些 vbscript 在单击链接时打开 mp4 文件。试试下面的代码。

<HTML>
    <head>

    <script language="VBScript"> 
    Dim oShell
    function openit(myFile)
        Set objShell = CreateObject("Wscript.Shell")
        objShell.Run myFile
    end function
    </script>

    </head>
    <body>
        <a href="#" onclick="runit 'file:///C:******\Video1.mp4'" language="vbscript">Video 1</a>
        <a href="#" onclick="runit 'file:///C:******\Video2.mp4'" language="vbscript">Video 2</a>
        <a href="#" onclick="runit 'file:///C:******\Video3.mp4'" language="vbscript">Video 3</a>
        <a href="#" onclick="runit 'file:///C:******\Video4.mp4'" language="vbscript">Video 4</a>
    </body>
</html>